New option -hide
This commit is contained in:
@ -1374,7 +1374,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
" Allow more or less harmless deviations from strict standards",
|
||||
" compliance.",
|
||||
" -boot_image \"any\"|\"isolinux\"|\"grub\"",
|
||||
" \"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"|\"cat_path=\"",
|
||||
" |\"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"",
|
||||
" |\"cat_path=\"|\"cat_hidden=on|iso_rr|joliet|off\"",
|
||||
" |\"load_size=\"|\"system_area=\"|\"partition_table=on|off\"",
|
||||
" Whether to discard or keep an exiting El Torito boot image.",
|
||||
" ISOLINUX can be made bootable by dir=/ or dir=/isolinux",
|
||||
@ -1504,13 +1505,17 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
" access time, modification time, both times.",
|
||||
" -alter_date_r type timestring iso_rr_path [***]",
|
||||
" Like -alter_date but affecting all files below directories.",
|
||||
" -hide on|iso_rr|joliet|off iso_rr_path [***]",
|
||||
" Keep names of files out of directory tree, but store their",
|
||||
" data content in the image.",
|
||||
" -find iso_rr_path [test [op] [test ...]] [-exec action [params]]",
|
||||
" performs an action on files below the given directory in",
|
||||
" the ISO image. Tests:",
|
||||
" -name pattern, -wholename pattern, -type b|c|d|p|f|l|s|e,",
|
||||
" -pending_data, -lba_range start count, -damaged,",
|
||||
" -has_acl, -has_xattr, -has_aaip, -has_filter, -has_md5",
|
||||
" -has_any_xattr, -prune, -decision yes|no, -true, -false",
|
||||
" -name pattern, -wholename pattern, -disk_name pattern,",
|
||||
" -type b|c|d|p|f|l|s|e, -pending_data, -hidden,",
|
||||
" -lba_range start count, -damaged, -has_acl, -has_xattr,",
|
||||
" -has_aaip, -has_filter, -has_md5, -has_any_xattr,",
|
||||
" -prune, -decision yes|no, -true, -false",
|
||||
" Operators: -not, -or, -and, -sub, (, -subend, ),",
|
||||
" -if, -then, -elseif, -else, -endif",
|
||||
" Action may be one of: echo, chown, chown_r, chgrp, chgrp_r",
|
||||
@ -1518,7 +1523,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
" rm, rm_r, compare, update, report_damage, report_lba,",
|
||||
" getfacl, setfacl, getfattr, setfattr, get_any_xattr,",
|
||||
" get_md5, check_md5, make_md5, set_filter, show_stream,",
|
||||
" mkisofs_r, find.",
|
||||
" mkisofs_r, hide, find.",
|
||||
" params are their arguments except iso_rr_path.",
|
||||
" -mkdir iso_rr_path [...]",
|
||||
" Create empty directories if they do not exist yet.",
|
||||
@ -1865,6 +1870,46 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
|
||||
/* Option -hide */
|
||||
int Xorriso_option_hide(struct XorrisO *xorriso, char *hide_state,
|
||||
int argc, char **argv, int *idx, int flag)
|
||||
{
|
||||
int i, ret, end_idx, optc= 0, was_failure= 0, fret, hide_mode;
|
||||
char **optv= NULL;
|
||||
|
||||
ret= Xorriso_opt_args(xorriso, "-hide", argc, argv, *idx, &end_idx, &optc,
|
||||
&optv, 0);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
hide_mode= Xorriso__hide_mode(hide_state, 0);
|
||||
if(hide_mode < 0) {
|
||||
sprintf(xorriso->info_text, "-hide : unknown hide state ");
|
||||
Text_shellsafe(hide_state, xorriso->info_text, 1);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
goto ex;
|
||||
}
|
||||
for(i= 0; i<optc; i++) {
|
||||
ret= Xorriso_set_hidden(xorriso, NULL, optv[i], hide_mode, 0);
|
||||
if(ret>0 && !xorriso->request_to_abort)
|
||||
continue; /* regular bottom of loop */
|
||||
|
||||
was_failure= 1;
|
||||
fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
|
||||
if(fret>=0)
|
||||
continue;
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
ret= 1;
|
||||
ex:;
|
||||
(*idx)= end_idx;
|
||||
Xorriso_opt_args(xorriso, "-hide", argc, argv, *idx, &end_idx, &optc, &optv,
|
||||
256);
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
return(!was_failure);
|
||||
}
|
||||
|
||||
|
||||
/* Option -history */
|
||||
int Xorriso_option_history(struct XorrisO *xorriso, char *line, int flag)
|
||||
{
|
||||
|
Reference in New Issue
Block a user