New -as mkisofs option --set_all_file_dates
This commit is contained in:
parent
02f1d08ae2
commit
64af78a887
@ -664,7 +664,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
|||||||
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
|
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
|
||||||
"-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
|
"-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
|
||||||
"--grub2-sparc-core", "--sort-weight-list", "--sort-weight-patterns",
|
"--grub2-sparc-core", "--sort-weight-list", "--sort-weight-patterns",
|
||||||
"-hppa-hdrversion","-file_name_limit",
|
"-hppa-hdrversion", "-file_name_limit", "--set_all_file_dates",
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
static char arg2_options[][41]= {
|
static char arg2_options[][41]= {
|
||||||
@ -905,6 +905,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
|||||||
" -appended_part_as_apm mark appended partitions in APM.",
|
" -appended_part_as_apm mark appended partitions in APM.",
|
||||||
" --modification-date=YYYYMMDDhhmmsscc",
|
" --modification-date=YYYYMMDDhhmmsscc",
|
||||||
" Override date of creation and modification",
|
" Override date of creation and modification",
|
||||||
|
" --set_all_file_dates TIME Override mtime, atime, ctime in all files",
|
||||||
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
|
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
|
||||||
" --grub2-mbr FILE Set GRUB2 MBR for boot image address patching",
|
" --grub2-mbr FILE Set GRUB2 MBR for boot image address patching",
|
||||||
#ifdef Xorriso_with_isohybriD
|
#ifdef Xorriso_with_isohybriD
|
||||||
@ -1281,6 +1282,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
|||||||
int *delay_opt_list= NULL, delay_opt_count= 0;
|
int *delay_opt_list= NULL, delay_opt_count= 0;
|
||||||
char *sfe= NULL, *adr= NULL, ra_text[80], *pathspec= NULL, *sort_file= NULL;
|
char *sfe= NULL, *adr= NULL, ra_text[80], *pathspec= NULL, *sort_file= NULL;
|
||||||
char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt;
|
char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt;
|
||||||
|
char *all_file_dates= NULL;
|
||||||
char *old_root= NULL, *argpt, *hargv[1];
|
char *old_root= NULL, *argpt, *hargv[1];
|
||||||
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
|
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
|
||||||
char *rm_merge_args[3], *rr_reloc_dir_pt= NULL;
|
char *rm_merge_args[3], *rr_reloc_dir_pt= NULL;
|
||||||
@ -1918,6 +1920,16 @@ not_enough_args:;
|
|||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto problem_handler_2;
|
goto problem_handler_2;
|
||||||
|
|
||||||
|
} else if(strcmp(argpt, "--set_all_file_dates") == 0) {
|
||||||
|
if(i+1>=argc)
|
||||||
|
goto not_enough_args;
|
||||||
|
i++;
|
||||||
|
if(all_file_dates != NULL)
|
||||||
|
Xorriso_free_meM(all_file_dates);
|
||||||
|
all_file_dates= NULL;
|
||||||
|
Xorriso_alloc_meM(all_file_dates, char, strlen(argv[i]) + 1);
|
||||||
|
strcpy(all_file_dates, argv[i]);
|
||||||
|
|
||||||
} else if(strcmp(argpt, "-input-charset")==0) {
|
} else if(strcmp(argpt, "-input-charset")==0) {
|
||||||
i++;
|
i++;
|
||||||
/* was already handled in first argument scan */;
|
/* was already handled in first argument scan */;
|
||||||
@ -2610,6 +2622,21 @@ problem_handler_boot:;
|
|||||||
if(xorriso->no_emul_toc & 1)
|
if(xorriso->no_emul_toc & 1)
|
||||||
xorriso->do_padding_by_libisofs= 1;
|
xorriso->do_padding_by_libisofs= 1;
|
||||||
|
|
||||||
|
if(all_file_dates != NULL) if(all_file_dates[0] != 0) {
|
||||||
|
hargv[0]= "/";
|
||||||
|
idx= 0;
|
||||||
|
ret= Xorriso_option_alter_date(xorriso, "b", all_file_dates, 1, hargv,
|
||||||
|
&idx, 1);
|
||||||
|
if(ret <= 0)
|
||||||
|
was_failure= 1;
|
||||||
|
idx= 0;
|
||||||
|
ret= Xorriso_option_alter_date(xorriso, "c", all_file_dates, 1, hargv,
|
||||||
|
&idx, 1);
|
||||||
|
if(ret <= 0)
|
||||||
|
was_failure= 1;
|
||||||
|
Xorriso_relax_compliance(xorriso, "always_gmt", 0);
|
||||||
|
}
|
||||||
|
|
||||||
if(do_print_size) {
|
if(do_print_size) {
|
||||||
ret= Xorriso_option_print_size(xorriso, 1);
|
ret= Xorriso_option_print_size(xorriso, 1);
|
||||||
goto ex;
|
goto ex;
|
||||||
@ -2626,6 +2653,7 @@ ex:;
|
|||||||
free(weight_list);
|
free(weight_list);
|
||||||
if(delay_opt_list != NULL)
|
if(delay_opt_list != NULL)
|
||||||
free(delay_opt_list);
|
free(delay_opt_list);
|
||||||
|
Xorriso_free_meM(all_file_dates);
|
||||||
Xorriso_free_meM(sort_file);
|
Xorriso_free_meM(sort_file);
|
||||||
Xorriso_free_meM(sfe);
|
Xorriso_free_meM(sfe);
|
||||||
Xorriso_free_meM(adr);
|
Xorriso_free_meM(adr);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2016.08.06.111650"
|
#define Xorriso_timestamP "2016.08.06.132358"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISOFS 1 "Version 1.4.5, Aug 05, 2016"
|
.TH XORRISOFS 1 "Version 1.4.5, Aug 06, 2016"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -558,6 +558,19 @@ discouraged to disable it by this option, except for the special use case
|
|||||||
to revoke the effect of \-r by:
|
to revoke the effect of \-r by:
|
||||||
\-\-norock \-R
|
\-\-norock \-R
|
||||||
.TP
|
.TP
|
||||||
|
\fB--set_all_file_dates\fR timestring
|
||||||
|
Set mtime, atime, and ctime of all files and directories to the given time.
|
||||||
|
.br
|
||||||
|
Valid timestring formats are: 'Nov 8 14:51:13 CET 2007', 110814512007.13,
|
||||||
|
2007110814511300. See also \-\-modification\-date= and man xorriso,
|
||||||
|
Examples of input timestrings.
|
||||||
|
.br
|
||||||
|
This action stays delayed until mkisofs emulation ends. Up to then it can be
|
||||||
|
revoked by \-\-set_all_file_dates with empty timestring.
|
||||||
|
In any case files which get into the ISO after mkisofs emulation ended
|
||||||
|
will not be affected, unless another mkisofs emulation
|
||||||
|
applies \-\-set_all_file_date again.
|
||||||
|
.TP
|
||||||
\fB\-file_name_limit\fR number
|
\fB\-file_name_limit\fR number
|
||||||
Set the maximum permissible length for file names in the range of 64 to 255.
|
Set the maximum permissible length for file names in the range of 64 to 255.
|
||||||
Path components which are longer than the given number will get truncated
|
Path components which are longer than the given number will get truncated
|
||||||
|
@ -521,6 +521,17 @@ File: xorrisofs.info, Node: SetExtras, Next: SetHide, Prev: SetCompl, Up: Op
|
|||||||
'xorrisofs' depend much on the naming fidelity of Rock Ridge. So
|
'xorrisofs' depend much on the naming fidelity of Rock Ridge. So
|
||||||
it is strongly discouraged to disable it by this option, except for
|
it is strongly discouraged to disable it by this option, except for
|
||||||
the special use case to revoke the effect of -r by: --norock -R
|
the special use case to revoke the effect of -r by: --norock -R
|
||||||
|
--set_all_file_dates timestring
|
||||||
|
Set mtime, atime, and ctime of all files and directories to the
|
||||||
|
given time.
|
||||||
|
Valid timestring formats are: 'Nov 8 14:51:13 CET 2007',
|
||||||
|
110814512007.13, 2007110814511300. See also --modification-date=
|
||||||
|
and man xorriso, Examples of input timestrings.
|
||||||
|
This action stays delayed until mkisofs emulation ends. Up to then
|
||||||
|
it can be revoked by --set_all_file_dates with empty timestring.
|
||||||
|
In any case files which get into the ISO after mkisofs emulation
|
||||||
|
ended will not be affected, unless another mkisofs emulation
|
||||||
|
applies --set_all_file_date again.
|
||||||
-file_name_limit number
|
-file_name_limit number
|
||||||
Set the maximum permissible length for file names in the range of
|
Set the maximum permissible length for file names in the range of
|
||||||
64 to 255. Path components which are longer than the given number
|
64 to 255. Path components which are longer than the given number
|
||||||
@ -1824,20 +1835,20 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
|
|||||||
|