Previously, when '--help' option is provided, the help message was
printed twice. To fix this issue, '--help' option is treated as an
argument like other options and print help message if '--help' option is
provided.
Change-Id: I5026fcdfc95a60ea093e15c3860f85eeda3ad2b9
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
struct arguments {
+ bool help;
bool resize;
bool update;
bool online;
assert(argv);
assert(args);
+ args->help = false;
args->resize = false;
args->update = false;
args->online = false;
return 0;
}
case 'h': {
- print_help(argv[0]);
+ args->help = true;
return 0;
}
case '?': {
return 1;
}
+ if (args.help) {
+ print_help(argv[0]);
+ return 0;
+ }
+
if (args.resize)
return do_resize();