New -as mkisofs options -cut_out and -hide_iso_path
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -690,13 +690,17 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
""
|
||||
};
|
||||
static char arg2_options[][41]= {
|
||||
"-hfs-bless-by", "--scdbackup_tag", "--sort-weight",
|
||||
"-hfs-bless-by", "-hide_iso_path", "--scdbackup_tag", "--sort-weight",
|
||||
""
|
||||
};
|
||||
static char arg3_options[][41]= {
|
||||
"-append_partition", "-hfsplus-file-creator-type",
|
||||
""
|
||||
};
|
||||
static char arg4_options[][41]= {
|
||||
"-cut_out",
|
||||
""
|
||||
};
|
||||
static char final_options[][41]= {
|
||||
"-find",
|
||||
""
|
||||
@ -722,6 +726,10 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
for(i=0; arg3_options[i][0]!=0; i++)
|
||||
if(strcmp(arg3_options[i], cmd)==0)
|
||||
return(1);
|
||||
*count= 4;
|
||||
for(i=0; arg4_options[i][0]!=0; i++)
|
||||
if(strcmp(arg4_options[i], cmd)==0)
|
||||
return(1);
|
||||
*count= argc - 1;
|
||||
for(i=0; final_options[i][0]!=0; i++)
|
||||
if(strcmp(final_options[i], cmd)==0)
|
||||
@ -809,6 +817,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
||||
" -hide-joliet-list FILE File with list of Joliet files to hide",
|
||||
" -hide-hfsplus GLOBFILE Hide HFS+ file",
|
||||
" -hide-hfsplus-list FILE File with list of HFS+ files to hide",
|
||||
" -hide_iso_path HIDE_STATE ISO_RR_PATH",
|
||||
" Hide file by its ISO path",
|
||||
" -input-charset CHARSET Local input charset for file name conversion",
|
||||
" -output-charset CHARSET Output charset for file name conversion",
|
||||
" -iso-level LEVEL Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2",
|
||||
@ -942,6 +952,9 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
||||
" a GUID to be used if -appended_part_as_gpt.",
|
||||
" -appended_part_as_gpt mark appended partitions in GPT instead of MBR.",
|
||||
" -appended_part_as_apm mark appended partitions in APM.",
|
||||
" -cut_out DISK_PATH BYTE_OFFSET BYTE_COUNT ISO_RR_PATH",
|
||||
" map a byte interval of a regular disk file",
|
||||
" into a regular file in the ISO image",
|
||||
" --modification-date=YYYYMMDDhhmmsscc",
|
||||
" Override date of creation and modification",
|
||||
" --set_all_file_dates TIME Override mtime, atime, ctime in all files",
|
||||
@ -2011,6 +2024,15 @@ not_enough_args:;
|
||||
if(argv[i] != argpt)
|
||||
delay_opt_list[delay_opt_count - 1]|= 1u<<31;
|
||||
i++;
|
||||
|
||||
} else if(strcmp(argpt, "-hide_iso_path") == 0) {
|
||||
if(i + 2 >= argc)
|
||||
goto not_enough_args;
|
||||
delay_opt_list[delay_opt_count++]= i;
|
||||
if(argv[i] != argpt)
|
||||
delay_opt_list[delay_opt_count - 1]|= 1u<<31;
|
||||
i+= 2;
|
||||
|
||||
} else if(strncmp(argpt, "--modification-date=", 20)==0) {
|
||||
ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0);
|
||||
if(ret <= 0)
|
||||
@ -2328,6 +2350,15 @@ rr_reloc_dir:;
|
||||
if(ret <= 0)
|
||||
goto problem_handler_2;
|
||||
|
||||
} else if(strcmp(argpt, "-cut_out") == 0) {
|
||||
if(i + 4 >= argc)
|
||||
goto not_enough_args;
|
||||
i+= 4;
|
||||
ret= Xorriso_option_cut_out(xorriso, argv[i - 3], argv[i - 2],
|
||||
argv[i - 1], argv[i], 0);
|
||||
if(ret <= 0)
|
||||
goto problem_handler_2;
|
||||
|
||||
} else if(argpt[0]=='-' && argpt[1]!=0) {
|
||||
ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1,
|
||||
&option_d, &iso_level, &lower_r, ra_text, 1);
|
||||
@ -2759,6 +2790,14 @@ problem_handler_2:;
|
||||
if(ret <= 0)
|
||||
goto problem_handler_boot;
|
||||
|
||||
} else if(strcmp(argpt, "-hide_iso_path") == 0) {
|
||||
int i_plus;
|
||||
|
||||
i_plus= i + 2;
|
||||
ret= Xorriso_option_hide(xorriso, argv[i + 1], i + 3, argv, &i_plus, 0);
|
||||
if(ret <= 0)
|
||||
goto problem_handler_boot;
|
||||
|
||||
}
|
||||
continue; /* regular bottom of loop */
|
||||
problem_handler_boot:;
|
||||
|
Reference in New Issue
Block a user