case 'T':
params.type = genimg_get_type_id(optarg);
if (params.type < 0) {
+ fprintf(stderr, "%s: Invalid type\n",
+ params.cmdname);
usage();
}
break;
}
}
- if (optind >= argc)
+ if (optind >= argc) {
+ fprintf(stderr, "%s: image file missing\n", params.cmdname);
usage();
+ }
/* set tparams as per input type_id */
tparams = imagetool_get_type(params.type);
* as per image type to be generated/listed
*/
if (tparams->check_params) {
- if (tparams->check_params(¶ms))
+ if (tparams->check_params(¶ms)) {
+ fprintf(stderr, "%s: Parameter check failed\n",
+ params.cmdname);
usage();
+ }
}
if (params.iflag)