New flag bit1 of API call Xorriso_prescan_args() reports unknown commands

This commit is contained in:
2011-05-17 15:16:56 +00:00
parent 55d6788bb6
commit f28da0c7ce
4 changed files with 22 additions and 12 deletions

View File

@ -226,14 +226,20 @@ int main(int argc, char **argv)
/* The prescan of arguments performs actions which have to happen before
the normal processing of startup files and arguments.
Among them are -help and -prog_help which end the program without
yelling its name and version.
*/
ret= Xorriso_prescan_args(xorriso,argc,argv,0);
if(ret == 0)
goto end_successfully;
/* Put out program name and version to stderr only if not done already now */
yell_xorriso();
if(ret < 0)
exit(5);
/* After having yelled xorriso, prescan again for unknown arguments */
ret= Xorriso_prescan_args(xorriso, argc, argv, 2);
if(ret < 0)
exit(5);
yell_xorriso();
/* The following command interpreters are allowed only after this
initialization.