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
This commit is contained in:
Ed Maste 2023-03-22 19:42:45 -04:00
parent b84aaf143c
commit c65c969bd5
2 changed files with 10 additions and 10 deletions

View File

@ -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,

View File

@ -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