summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2023-04-18 22:56:41 +0000
committerchristos <christos@NetBSD.org>2023-04-18 22:56:41 +0000
commita14117e2e79a74e1b74990c7b84163ceb5c14abe (patch)
tree0a7a899c599e9469e12ec7b1a29537c1d602e8fa /usr.sbin
parent3eb2b8e46dafe48db38af1779ab59ec297e47a3b (diff)
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.c8
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.h22
2 files changed, 16 insertions, 14 deletions
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
index 9f7170dff81..e65bc3480f8 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.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_ATTRIBUTES *p, fsnode *_node)
*/
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,
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.h b/usr.sbin/makefs/cd9660/iso9660_rrip.h
index 1f54ae84048..87eb7306462 100644
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.h
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.h
@@ -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