Preparations for ISO/HFS+ hybrid images by Vladimir Serbinenko
This commit is contained in:
@ -886,8 +886,10 @@ int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag)
|
||||
|
||||
|
||||
/* Option -not_leaf , (-hide_disk_leaf resp. -as mkisofs -hide) */
|
||||
/* @param flag bit0= add to iso_rr_hidings rather than disk_exclusions
|
||||
bit1= add to joliet_hidings rather than disk_exclusions
|
||||
/* @param flag bit0-bit5= hide rather than adding to disk_exclusions
|
||||
bit0= add to iso_rr_hidings
|
||||
bit1= add to joliet_hidings
|
||||
bit2= add to hfsplus_hidings
|
||||
*/
|
||||
int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag)
|
||||
{
|
||||
@ -902,7 +904,7 @@ int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag)
|
||||
Xorriso__bourne_to_reg(pattern, regexpr, 0);
|
||||
if(regcomp(&re, regexpr, 0)!=0)
|
||||
{ret= 0; goto cannot_add;}
|
||||
if(flag & 3) {
|
||||
if(flag & 63) {
|
||||
if(flag & 1) {
|
||||
ret= Exclusions_add_not_leafs(xorriso->iso_rr_hidings, pattern, &re, 0);
|
||||
if(ret<=0)
|
||||
@ -913,6 +915,11 @@ int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag)
|
||||
if(ret<=0)
|
||||
goto cannot_add;
|
||||
}
|
||||
if(flag & 4) {
|
||||
ret= Exclusions_add_not_leafs(xorriso->hfsplus_hidings, pattern, &re, 0);
|
||||
if(ret<=0)
|
||||
goto cannot_add;
|
||||
}
|
||||
} else {
|
||||
ret= Exclusions_add_not_leafs(xorriso->disk_exclusions, pattern, &re, 0);
|
||||
}
|
||||
@ -1054,13 +1061,16 @@ ex:;
|
||||
/* @param flag bit0= add to iso_rr_hidings rather than disk_exclusions
|
||||
bit1= add to joliet_hidings rather than disk_exclusions
|
||||
bit2= enable disk pattern expansion regardless of -disk_pattern
|
||||
|
||||
bit8-13= consolidated hide state bits, duplicating bit0-1
|
||||
bit8= add to iso_rr_hidings
|
||||
bit9= add to joliet_hidings
|
||||
bit10= add to hfsplus_hidings
|
||||
*/
|
||||
int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv,
|
||||
int *idx, int flag)
|
||||
{
|
||||
int ret, end_idx, num_descr= 0, dummy, optc= 0, i;
|
||||
char **descr= NULL, **optv= NULL, *eff_path= NULL;
|
||||
char **descr= NULL, **optv= NULL, *eff_path= NULL, *hpt= NULL;
|
||||
|
||||
end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx,
|
||||
(xorriso->do_disk_pattern == 1 || (flag & 4)) | 2);
|
||||
@ -1091,20 +1101,23 @@ no_memory:;
|
||||
goto no_memory;
|
||||
}
|
||||
|
||||
ret= Xorriso_opt_args(xorriso, (flag & 3) ? "-hide_disk_paths" : "-not_paths",
|
||||
ret= Xorriso_opt_args(xorriso,
|
||||
(flag & 0x3f03) ? "-hide_disk_paths" : "-not_paths",
|
||||
num_descr, descr, 0, &dummy, &optc, &optv,
|
||||
2 | ((flag & 4) << 7));
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
if(flag & 3) {
|
||||
if(flag & 1) {
|
||||
if(flag & 0x3f03) {
|
||||
if(flag & 0x0101) {
|
||||
ret= Exclusions_add_not_paths(xorriso->iso_rr_hidings,
|
||||
num_descr, descr, optc, optv, 0);
|
||||
if(ret<=0) {
|
||||
no_hide:;
|
||||
sprintf(xorriso->info_text,
|
||||
"Cannot add path list: -hide_disk_paths %s ",
|
||||
Xorriso__hide_mode_text(flag & 3, 0));
|
||||
sprintf(xorriso->info_text, "Cannot add path list: -hide_disk_paths ");
|
||||
hpt= Xorriso__hide_mode_text(flag & 0x3f03, 0);
|
||||
if(hpt != NULL)
|
||||
sprintf(xorriso->info_text + strlen(xorriso->info_text), "%s ", hpt);
|
||||
Xorriso_free_meM(hpt);
|
||||
Text_shellsafe(argv[*idx], xorriso->info_text, 1);
|
||||
strcat(xorriso->info_text, num_descr > 1 ? " ... " : " ");
|
||||
strcat(xorriso->info_text, xorriso->list_delimiter);
|
||||
@ -1112,12 +1125,18 @@ no_hide:;
|
||||
goto ex;
|
||||
}
|
||||
}
|
||||
if(flag & 2) {
|
||||
if(flag & 0x0202) {
|
||||
ret= Exclusions_add_not_paths(xorriso->joliet_hidings,
|
||||
num_descr, descr, optc, optv, 0);
|
||||
if(ret<=0)
|
||||
goto no_hide;
|
||||
}
|
||||
if(flag & 0x0400) {
|
||||
ret= Exclusions_add_not_paths(xorriso->hfsplus_hidings,
|
||||
num_descr, descr, optc, optv, 0);
|
||||
if(ret<=0)
|
||||
goto no_hide;
|
||||
}
|
||||
} else {
|
||||
ret= Exclusions_add_not_paths(xorriso->disk_exclusions,
|
||||
num_descr, descr, optc, optv, 0);
|
||||
|
Reference in New Issue
Block a user