|
|
|
@ -1647,9 +1647,19 @@ int Xorriso_prescan_args(struct XorrisO *xorriso, int argc, char **argv,
|
|
|
|
|
ret= Xorriso_option_no_rc(xorriso, 0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
error_seen= 1;
|
|
|
|
|
} else if(xorriso->argument_emulation >= 1 &&
|
|
|
|
|
xorriso->argument_emulation <= 2) {
|
|
|
|
|
{ret= 1; goto ex;}
|
|
|
|
|
} else if(xorriso->argument_emulation == 1) { /* mkisofs emulation */
|
|
|
|
|
if(xorriso->dev_fd_1 < 0)
|
|
|
|
|
goto protect_stdout;
|
|
|
|
|
{ret= 1; goto ex;}
|
|
|
|
|
|
|
|
|
|
} else if(xorriso->argument_emulation == 2) { /* cdrecord emulation */
|
|
|
|
|
if(xorriso->dev_fd_1 < 0)
|
|
|
|
|
if(Xorriso_cdrskin_uses_stdout(xorriso, argc - 1 - (flag & 1),
|
|
|
|
|
argv + 1 + (flag & 1), 0))
|
|
|
|
|
goto protect_stdout;
|
|
|
|
|
{ret= 1; goto ex;}
|
|
|
|
|
|
|
|
|
|
} else if((strcmp(cmd,"dev")==0 || strcmp(cmd,"outdev")==0 ||
|
|
|
|
|
strcmp(cmd,"indev")==0) &&
|
|
|
|
|
(strcmp(arg1,"stdio:/dev/fd/1")==0 || strcmp(arg1,"-")==0) &&
|
|
|
|
@ -1670,6 +1680,8 @@ protect_stdout:;
|
|
|
|
|
sprintf(xorriso->info_text, "Disabling use of libreadline.");
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
|
|
|
|
|
}
|
|
|
|
|
if(xorriso->argument_emulation >= 1 && xorriso->argument_emulation <=2)
|
|
|
|
|
{ret= 1; goto ex;}
|
|
|
|
|
|
|
|
|
|
} else if(strcmp(cmd,"abort_on")==0 && was_dashed == 1) {
|
|
|
|
|
i++;
|
|
|
|
@ -1693,12 +1705,22 @@ protect_stdout:;
|
|
|
|
|
|
|
|
|
|
} else if(strcmp(cmd,"as")==0 && was_dashed == 1) {
|
|
|
|
|
ret= Xorriso_count_args(xorriso, argc - i, argv + i, &arg_count, 1);
|
|
|
|
|
if(ret == 1)
|
|
|
|
|
if(ret == 1) {
|
|
|
|
|
i+= arg_count;
|
|
|
|
|
if(was_dashed == 1)
|
|
|
|
|
if(strcmp(arg1, "mkisofs")==0 || strcmp(arg1, "genisoimage")==0 ||
|
|
|
|
|
strcmp(arg1, "genisofs")==0 || strcmp(arg1, "xorrisofs")==0)
|
|
|
|
|
|
|
|
|
|
if((strcmp(arg1, "cdrecord")==0 || strcmp(arg1, "wodim")==0 ||
|
|
|
|
|
strcmp(arg1, "cdrskin")==0 || strcmp(arg1, "xorrecord")==0) &&
|
|
|
|
|
xorriso->dev_fd_1 < 0)
|
|
|
|
|
if(Xorriso_cdrskin_uses_stdout(xorriso, arg_count - 1,
|
|
|
|
|
argv + i - arg_count + 2, 0))
|
|
|
|
|
goto protect_stdout;
|
|
|
|
|
}
|
|
|
|
|
if(was_dashed == 1) {
|
|
|
|
|
if((strcmp(arg1, "mkisofs")==0 || strcmp(arg1, "genisoimage")==0 ||
|
|
|
|
|
strcmp(arg1, "genisofs")==0 || strcmp(arg1, "xorrisofs")==0) &&
|
|
|
|
|
xorriso->dev_fd_1 < 0)
|
|
|
|
|
goto protect_stdout;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if(strcmp(cmd, "list_delimiter") == 0) {
|
|
|
|
|
/* Needed for interpreting other args. Gets reset after prescan. */
|
|
|
|
|