Suppressed warnings about non existing boot equipment files when mkisofs emulation is active

This commit is contained in:
Thomas Schmitt 2024-05-19 22:51:08 +02:00
parent 2c608c9d27
commit 7e4a714c12
6 changed files with 26 additions and 4 deletions

View File

@ -121,6 +121,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->initial_wdx[0]= 0;
m->no_rc= 0;
m->argument_emulation= 0;
m->current_interpreter= 0;
m->rc_filename_count= Xorriso_rc_nuM;
for(i=0;i<m->rc_filename_count-1;i++)

View File

@ -126,7 +126,7 @@ int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
int do_atip= 0, do_checkdrive= 0, do_eject= 0, do_scanbus= 0;
int do_toc= 0, do_verbous= 0, do_version= 0, do_help= 0, do_waiti= 0;
int do_multi= 0, do_msinfo= 0, do_grow= 0, do_isosize= 0, do_xa1= 0;
int do_auto_close= 0;
int do_auto_close= 0, mem_current_interpreter;
double write_start_address= -1.0, tsize= -1.0, mem_auto_close;
char *track_source= NULL, *dev_adr= NULL, *cpt;
char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80];
@ -183,6 +183,9 @@ static char blank_help[][80]= {
"@End_of_helptexT@"
};
mem_current_interpreter= xorriso->current_interpreter;
xorriso->current_interpreter= 2;
mem_do_close= xorriso->do_close;
mem_auto_close= xorriso->auto_close;
Xorriso_alloc_meM(track_source, char, SfileadrL);
@ -595,6 +598,7 @@ ex:;
xorriso->auto_close= mem_auto_close;
Xorriso_free_meM(dev_adr);
Xorriso_free_meM(track_source);
xorriso->current_interpreter= mem_current_interpreter;
return(ret);
}
@ -1374,7 +1378,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int do_print_size= 0, fd, idx, iso_level= -1, palohdrversion;
int was_failure= 0, fret, lower_r= 0, zero= 0;
int dir_mode= -1, file_mode= -1, count, partition_number;
int allow_dir_id_ext= -1;
int allow_dir_id_ext= -1, mem_current_interpreter;
int root_seen= 0, do_md5_mem, option_d= 0, arg_count;
mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0;
@ -1391,6 +1395,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
struct stat stbuf;
mem_current_interpreter= xorriso->current_interpreter;
xorriso->current_interpreter= 1;
Xorriso_alloc_meM(sfe, char, 5*SfileadrL);
Xorriso_alloc_meM(adr, char, SfileadrL+8);
Xorriso_alloc_meM(pathspec, char, 2*SfileadrL);
@ -2852,6 +2859,7 @@ ex:;
Xorriso_free_meM(eff_path);
Xorriso_free_meM(indev);
Xorriso_free_meM(old_root);
xorriso->current_interpreter= mem_current_interpreter;
return(ret);
}

View File

@ -2830,6 +2830,9 @@ int Xorriso_warn_if_not_exist(struct XorrisO *xorriso, char *prefix,
if(ept != NULL)
*(ept + 1)= 0;
if(ret == -1) {
/* This is a normal situation with -as mkisofs emulation */
if(xorriso->current_interpreter == 1)
return(2);
sprintf(xorriso->info_text + strlen(xorriso->info_text),
" : path does not yet exist %s : ", where);
} else {

View File

@ -983,12 +983,14 @@ next_command:;
if((*idx)>=argc)
{ret= 1; goto ex;}
}
xorriso->current_interpreter= 0;
if((xorriso->arrange_args || (flag & 8)) && !(flag & (4 | 16))) {
ret= Xorriso_exec_args_sorted(xorriso, argc, argv, idx, 0);
goto ex;
}
}
xorriso->current_interpreter= 0;
ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1);
if((ret == 1 || ret == 2) &&
strcmp(argv[*idx], xorriso->list_delimiter) != 0) {

View File

@ -100,13 +100,20 @@ struct XorrisO { /* the global context of xorriso */
char initial_wdx[SfileadrL];
int no_rc;
/* Command line argument emulations:
/* Command line argument emulations by program name:
0=xorriso mode
1=mkisofs mode
2=cdrecord mode
*/
int argument_emulation;
/* Under which interpreter the current activities are running:
0=xorriso mode : Xorriso_interpreter()
1=mkisofs mode : Xorriso_genisofs()
2=cdrecord mode : Xorriso_cdrskin()
*/
int current_interpreter;
/** List of startupfiles */
char rc_filenames[Xorriso_rc_nuM][SfileadrL];
int rc_filename_count;
@ -295,6 +302,7 @@ struct XorrisO { /* the global context of xorriso */
1= value is session number
2= value is track number
3= value is lba
4= value is volid
bit16= with mode 3 : value is possibly 16 too high.
Let isoburn_set_msc1() adjust it.
bit30= interference with normal msc1 processing

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.05.19.074254"
#define Xorriso_timestamP "2024.05.19.204636"