aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2023-03-22 23:42:45 +0000
committerEd Maste <emaste@FreeBSD.org>2023-03-23 11:11:58 +0000
commitc65c969bd5d4ae7c52dedafb3c39b7e933079d4a (patch)
tree472277455abcb3e3c5f08355a47ccd916cc73f20 /usr.sbin
parentb84aaf143c5097e6b2481b9afec66c90deec627f (diff)
downloadsrc-c65c969bd5d4ae7c52dedafb3c39b7e933079d4a.tar.gz
src-c65c969bd5d4ae7c52dedafb3c39b7e933079d4a.zip
makefs: correct iso9660 Rock Ridge TF timestamps
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. PR: 203531 Reported by: Thomas Schmitt <scdbackup@gmx.net> Reviewed by: jrtc27, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39221
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.c4
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
index d4440a656bad..afe46c58747d 100644
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c
@@ -699,11 +699,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 3e1a6cb0e7d8..ef35405c62e6 100644
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.h
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.h
@@ -52,14 +52,14 @@
#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 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_LONG_FORM 0x80
#define NM_CONTINUE 0x80
#define NM_CURRENT 0x100
#define NM_PARENT 0x200