#endif
fprintf(stderr, " %s -V ==> print version information and exit\n",
params.cmdname);
- fprintf(stderr, "Use -T to see a list of available image types\n");
+ fprintf(stderr, "Use '-T list' to see a list of available image types\n");
exit(EXIT_FAILURE);
}
params.skipcpy = 1;
break;
case 'T':
+ if (strcmp(optarg, "list") == 0) {
+ show_valid_options(IH_TYPE);
+ exit(EXIT_SUCCESS);
+ }
type = genimg_get_type_id(optarg);
if (type < 0) {
show_valid_options(IH_TYPE);
+ 0x20, 0 };
int i = params.file_size;
for (; i < aligned_filesize; i++) {
- if (write(ifd, &i, 1) != 1) {
+ if (write(ifd, (char *) &i, 1) != 1) {
fprintf(stderr,
"%s: Write error on %s: %s\n",
params.cmdname,