Module Name:    src
Committed By:   christos
Date:           Tue Apr 18 22:56:41 UTC 2023

Modified Files:
        src/usr.sbin/makefs/cd9660: iso9660_rrip.c iso9660_rrip.h

Log Message:
The bit definitions for the TF_* timestamp bits (TF_MODIFY, etc.) were
incorrect, and timestamps were written in the wrong order.

See RRIP 4.1.6 Description of the "TF" System Use Entry for details.

From: https://reviews.freebsd.org/D39221


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makefs/cd9660/iso9660_rrip.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/makefs/cd9660/iso9660_rrip.h

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/iso9660_rrip.c
diff -u src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.14 src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.15
--- src/usr.sbin/makefs/cd9660/iso9660_rrip.c:1.14	Fri May 30 09:14:47 2014
+++ src/usr.sbin/makefs/cd9660/iso9660_rrip.c	Tue Apr 18 18:56:41 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $	*/
+/*	$NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos 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.14 2014/05/30 13:14:47 martin Exp $");
+__RCSID("$NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos Exp $");
 #endif  /* !__lint */
 
 static void cd9660_rrip_initialize_inode(cd9660node *);
@@ -697,11 +697,11 @@ cd9660node_rrip_tf(struct ISO_SUSP_ATTRI
 	 */
 
 	cd9660_time_915(p->attr.rr_entry.TF.timestamp,
-		_node->inode->st.st_atime);
+		_node->inode->st.st_mtime);
 	p->attr.rr_entry.TF.h.length[0] += 7;
 
 	cd9660_time_915(p->attr.rr_entry.TF.timestamp + 7,
-		_node->inode->st.st_mtime);
+		_node->inode->st.st_atime);
 	p->attr.rr_entry.TF.h.length[0] += 7;
 
 	cd9660_time_915(p->attr.rr_entry.TF.timestamp + 14,

Index: src/usr.sbin/makefs/cd9660/iso9660_rrip.h
diff -u src/usr.sbin/makefs/cd9660/iso9660_rrip.h:1.6 src/usr.sbin/makefs/cd9660/iso9660_rrip.h:1.7
--- src/usr.sbin/makefs/cd9660/iso9660_rrip.h:1.6	Mon Jan 28 16:03:28 2013
+++ src/usr.sbin/makefs/cd9660/iso9660_rrip.h	Tue Apr 18 18:56:41 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: iso9660_rrip.h,v 1.6 2013/01/28 21:03:28 christos Exp $	*/
+/*	$NetBSD: iso9660_rrip.h,v 1.7 2023/04/18 22:56:41 christos Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -48,15 +48,17 @@
 
 #define	 PX_LENGTH	   0x2C
 #define	 PN_LENGTH	   0x14
-#define	 TF_CREATION	   0x00
-#define	 TF_MODIFY	   0x01
-#define	 TF_ACCESS	   0x02
-#define	 TF_ATTRIBUTES	   0x04
-#define	 TF_BACKUP	   0x08
-#define	 TF_EXPIRATION	   0x10
-#define	 TF_EFFECTIVE	   0x20
-#define	 TF_LONGFORM	   0x40
-#define  NM_CONTINUE	   0x80
+
+#define	 TF_CREATION	   0x01
+#define	 TF_MODIFY	   0x02
+#define	 TF_ACCESS	   0x04
+#define	 TF_ATTRIBUTES	   0x08
+#define	 TF_BACKUP	   0x10
+#define	 TF_EXPIRATION	   0x20
+#define	 TF_EFFECTIVE	   0x40
+#define	 TF_LONGFORM	   0x80
+
+#define	 NM_CONTINUE	   0x80
 #define	 NM_CURRENT	   0x100
 #define	 NM_PARENT	   0x200
 

Reply via email to