New -volume_date mode "all_file_dates"

This commit is contained in:
2016-08-16 13:13:05 +00:00
parent adcd2386eb
commit bda4b37e97
7 changed files with 52 additions and 23 deletions

View File

@ -1282,7 +1282,6 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int *delay_opt_list= NULL, delay_opt_count= 0;
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 *all_file_dates= NULL;
char *old_root= NULL, *argpt, *hargv[1];
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
char *rm_merge_args[3], *rr_reloc_dir_pt= NULL;
@ -1925,11 +1924,12 @@ not_enough_args:;
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]);
if(strlen(argv[i]) >= sizeof(xorriso->all_file_dates)) {
sprintf(xorriso->info_text, "--set_all_file_dates: time text too long");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
ret= 0; goto problem_handler_2;
}
strcpy(xorriso->all_file_dates, argv[i]);
} else if(strcmp(argpt, "-input-charset")==0) {
i++;
@ -2631,21 +2631,6 @@ problem_handler_boot:;
if(xorriso->no_emul_toc & 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) {
ret= Xorriso_option_print_size(xorriso, 1);
goto ex;
@ -2662,7 +2647,6 @@ ex:;
free(weight_list);
if(delay_opt_list != NULL)
free(delay_opt_list);
Xorriso_free_meM(all_file_dates);
Xorriso_free_meM(sort_file);
Xorriso_free_meM(sfe);
Xorriso_free_meM(adr);