mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
util_opt: Correct util_opt_example to handle all possible options
The util_opt_example allows to specify '-l' and '-m, --manual' options, but does not handle them. This leads to error message 'PANIC: The application terminated due to an unrecoverable error' with 'Option 'l' should not be handled here' and the program is aborted. Add the required case statements in the switch to handle those options. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
2c4c210ca8
commit
712433d7f9
@@ -112,6 +112,12 @@ int main(int argc, char *argv[])
|
||||
case OPT_NOSHORT:
|
||||
printf("Specified: --noshort\n");
|
||||
break;
|
||||
case 'l':
|
||||
printf("Specified: -l\n");
|
||||
break;
|
||||
case 'm':
|
||||
printf("Specified: --manual\n");
|
||||
break;
|
||||
default:
|
||||
util_opt_print_parse_error(c, argv);
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user