Module Name: src
Committed By: reinoud
Date: Tue Jul 30 16:02:24 UTC 2013
Modified Files:
src/usr.sbin/makefs: cd9660.c
src/usr.sbin/makefs/cd9660: iso9660_rrip.c
Log Message:
`makefs -t cd9660' fix from FreeBSD:
Submitted by: Thomas Schmitt via [email protected]
Obtained from: FreeBSD r253707
- 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.
- 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.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makefs/cd9660.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/makefs/cd9660/iso9660_rrip.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/cd9660.c
diff -u src/usr.sbin/makefs/cd9660.c:1.43 src/usr.sbin/makefs/cd9660.c:1.44
--- src/usr.sbin/makefs/cd9660.c:1.43 Thu Jan 31 15:15:15 2013
+++ src/usr.sbin/makefs/cd9660.c Tue Jul 30 16:02:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660.c,v 1.43 2013/01/31 15:15:15 christos Exp $ */
+/* $NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.43 2013/01/31 15:15:15 christos Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $");
#endif /* !__lint */
#include <string.h>
@@ -723,8 +723,9 @@ cd9660_finalize_PVD(iso9660_disk *diskSt
/*
cd9660_set_date(diskStructure->primaryDescriptor.expiration_date, now);
*/
+ memset(diskStructure->primaryDescriptor.expiration_date, '0' ,16);
+ diskStructure->primaryDescriptor.expiration_date[16] = 0;
- memset(diskStructure->primaryDescriptor.expiration_date, '0' ,17);
cd9660_time_8426(
(unsigned char *)diskStructure->primaryDescriptor.effective_date,
tim);
Index: src/usr.sbin/makefs/cd9660/iso9660_rrip.c
diff -u src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.12 src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.13
--- src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.12 Mon Jan 28 21:03:28 2013
+++ src/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Jul 30 16:02:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: iso9660_rrip.c,v 1.12 2013/01/28 21:03:28 christos Exp $ */
+/* $NetBSD: iso9660_rrip.c,v 1.13 2013/07/30 16:02:23 reinoud Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -44,7 +44,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: iso9660_rrip.c,v 1.12 2013/01/28 21:03:28 christos Exp $");
+__RCSID("$NetBSD: iso9660_rrip.c,v 1.13 2013/07/30 16:02:23 reinoud Exp $");
#endif /* !__lint */
static void cd9660_rrip_initialize_inode(cd9660node *);
@@ -687,7 +687,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;
/*