diff options
author | marius <marius@FreeBSD.org> | 2013-07-27 15:28:31 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2013-07-27 15:28:31 +0000 |
commit | 1ff1c7f52383c9876ea632989c33363726625bd7 (patch) | |
tree | 366a9427926347864b259e70ed54fdfd3ce8caad /usr.sbin | |
parent | 2b433ed7774220e85663873a45c2aa18d9f66fe0 (diff) | |
download | FreeBSD-src-1ff1c7f52383c9876ea632989c33363726625bd7.zip FreeBSD-src-1ff1c7f52383c9876ea632989c33363726625bd7.tar.gz |
- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
rather than NetBSD.
- Correctly set the Expiration Time in the Primary Volume Descriptor;
according to ISO 9660 8.4.26.1 unspecified date and time are denoted
by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1]
- Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read
as unsigned byte. [2]
Note: This is according to ISO 9660 9.1.10.
- Rock Ridge TF entries should use a length of 5, because after the 4
bytes of generic SUSP header there is one byte of flags. See typedef
of ISO_RRIP_TF in iso9660_rrip.h. [1]
Submitted by: Thomas Schmitt [1]
Obtained from: NetBSD [2]
MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/makefs/cd9660.c | 5 | ||||
-rw-r--r-- | usr.sbin/makefs/cd9660/iso9660_rrip.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 2b33446..f0e2f38 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -230,7 +230,7 @@ cd9660_set_defaults(void) memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,37); memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,37); - strcpy(diskStructure.primaryDescriptor.system_id,"NetBSD"); + strcpy(diskStructure.primaryDescriptor.system_id, "FreeBSD"); cd9660_defaults_set = 1; @@ -681,7 +681,8 @@ cd9660_finalize_PVD(void) cd9660_set_date(diskStructure.primaryDescriptor.expiration_date, now); */ - memset(diskStructure.primaryDescriptor.expiration_date, '0' ,17); + memset(diskStructure.primaryDescriptor.expiration_date, '0', 16); + diskStructure.primaryDescriptor.expiration_date[16] = 0; cd9660_time_8426( (unsigned char *)diskStructure.primaryDescriptor.effective_date, tim); diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c index 39e0acf..40acf40 100644 --- a/usr.sbin/makefs/cd9660/iso9660_rrip.c +++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.10 2011/05/29 17:07:58 tsutsui Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -419,9 +419,9 @@ cd9660_rrip_initialize_node(cd9660node *node, cd9660node *parent, } else if ((node->node != NULL) && ((strlen(node->node->name) != - (int)node->isoDirRecord->name_len[0]) || + (uint8_t)node->isoDirRecord->name_len[0]) || (memcmp(node->node->name,node->isoDirRecord->name, - (int) node->isoDirRecord->name_len[0]) != 0))) { + (uint8_t)node->isoDirRecord->name_len[0]) != 0))) { cd9660_rrip_NM(node); } @@ -685,7 +685,7 @@ int cd9660node_rrip_tf(struct ISO_SUSP_ATTRIBUTES *p, fsnode *_node) { p->attr.rr_entry.TF.flags[0] = TF_MODIFY | TF_ACCESS | TF_ATTRIBUTES; - p->attr.rr_entry.TF.h.length[0] = 4; + p->attr.rr_entry.TF.h.length[0] = 5; p->attr.rr_entry.TF.h.version[0] = 1; /* |