Accept Rock Ridge Creation time as ctime if no Attributes time is present.
This commit is contained in:
parent
905f4f898f
commit
01c7a0d5ec
@ -1465,9 +1465,6 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
|
|||||||
memset(&atts, 0, sizeof(struct stat));
|
memset(&atts, 0, sizeof(struct stat));
|
||||||
atts.st_nlink = 1;
|
atts.st_nlink = 1;
|
||||||
|
|
||||||
#ifdef Libisofs_for_bsd_inst_isoS
|
|
||||||
|
|
||||||
/* >>> ??? see read_rr_TF : shall libisofs follow a Linux inconsistency ? */
|
|
||||||
/* Set preliminary file type */
|
/* Set preliminary file type */
|
||||||
if (record->flags[0] & 0x02) {
|
if (record->flags[0] & 0x02) {
|
||||||
atts.st_mode = S_IFDIR;
|
atts.st_mode = S_IFDIR;
|
||||||
@ -1475,8 +1472,6 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
|
|||||||
atts.st_mode = S_IFREG;
|
atts.st_mode = S_IFREG;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Libisofs_for_bsd_inst_isoS */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First of all, check for unsupported ECMA-119 features
|
* First of all, check for unsupported ECMA-119 features
|
||||||
*/
|
*/
|
||||||
|
@ -8908,14 +8908,4 @@ struct burn_source {
|
|||||||
#define Libisofs_with_rrip_rR yes
|
#define Libisofs_with_rrip_rR yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Experiment : bring representation of BSD installation ISOs near to
|
|
||||||
their representation by the Linux kernel.
|
|
||||||
Rock Ridge TF has ctime in CREATE rather than ATTRIBUTES.
|
|
||||||
Linux accepts this, but not for directories.
|
|
||||||
Some files only have ECMA-119 names, which Linux maps
|
|
||||||
to lowercase.
|
|
||||||
#define Libisofs_for_bsd_inst_isoS yes
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*LIBISO_LIBISOFS_H_*/
|
#endif /*LIBISO_LIBISOFS_H_*/
|
||||||
|
@ -211,29 +211,19 @@ int read_rr_TF(struct susp_sys_user_entry *tf, struct stat *st)
|
|||||||
|
|
||||||
/* 1. Creation time */
|
/* 1. Creation time */
|
||||||
if (tf->data.TF.flags[0] & (1 << 0)) {
|
if (tf->data.TF.flags[0] & (1 << 0)) {
|
||||||
|
/* Linux accepts ctime by Creation time and by Attributes time.
|
||||||
#ifdef Libisofs_for_bsd_inst_isoS
|
* If both are given, then Attribute time will win.
|
||||||
|
|
||||||
/* FreeBSD installation ISOs represent ctime by Creation time rather
|
|
||||||
* than by Attributes time. If both are given, then Attribute time
|
|
||||||
* will win. Linux 3.16 does not do this for directories.
|
|
||||||
*/
|
*/
|
||||||
/* >>> ??? shall libisofs follow a Linux inconsistency ? */
|
if (tf->len_sue[0] < 5 + (nts+1) * s) {
|
||||||
if ((st->st_mode & S_IFMT) != S_IFDIR) {
|
/* RR TF entry too short. */
|
||||||
if (tf->len_sue[0] < 5 + (nts+1) * s) {
|
return ISO_WRONG_RR;
|
||||||
/* RR TF entry too short. */
|
|
||||||
return ISO_WRONG_RR;
|
|
||||||
}
|
|
||||||
if (s == 7) {
|
|
||||||
time = iso_datetime_read_7(&tf->data.TF.t_stamps[nts*7]);
|
|
||||||
} else {
|
|
||||||
time = iso_datetime_read_17(&tf->data.TF.t_stamps[nts*17]);
|
|
||||||
}
|
|
||||||
st->st_ctime = time;
|
|
||||||
}
|
}
|
||||||
|
if (s == 7) {
|
||||||
#endif /* Libisofs_for_bsd_inst_isoS */
|
time = iso_datetime_read_7(&tf->data.TF.t_stamps[nts*7]);
|
||||||
|
} else {
|
||||||
|
time = iso_datetime_read_17(&tf->data.TF.t_stamps[nts*17]);
|
||||||
|
}
|
||||||
|
st->st_ctime = time;
|
||||||
++nts;
|
++nts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user