Replace the generic error message with a more informative one.
This helps users quickly understand the correct command-line argument
format when the tool reports an error.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Tested-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
/* This command takes UUIDs * images and output file. */
if (optind + images + 1 != argc) {
- fprintf(stderr, "Error: UUID list or output file is not specified or too much.\n");
+ fprintf(stderr,
+ "Error: Expected %ld UUID string(s) and 1 output file, got %d argument(s).\n",
+ images, argc - optind);
print_usage();
return -ERANGE;
}