Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs/cd9660 The bit definitions for the TF_* time...



details:   https://anonhg.NetBSD.org/src/rev/c23aa13ca138
branches:  trunk
changeset: 374325:c23aa13ca138
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 18 22:56:41 2023 +0000

description:
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:

 usr.sbin/makefs/cd9660/iso9660_rrip.c |   8 ++++----
 usr.sbin/makefs/cd9660/iso9660_rrip.h |  22 ++++++++++++----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diffs (68 lines):

diff -r d1be41972e1d -r c23aa13ca138 usr.sbin/makefs/cd9660/iso9660_rrip.c
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c     Tue Apr 18 22:42:52 2023 +0000
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c     Tue Apr 18 22:56:41 2023 +0000
@@ -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,
diff -r d1be41972e1d -r c23aa13ca138 usr.sbin/makefs/cd9660/iso9660_rrip.h
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.h     Tue Apr 18 22:42:52 2023 +0000
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.h     Tue Apr 18 22:56:41 2023 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index