X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fmkimage.c;h=28ff35e670a3e37ccce21cbe16f30a2959aa35d6;hb=4f6c7b12ed425095e635c32f184e8f8002da3823;hp=b0c98f6f5512be510e463538a24d35d36dfdcd91;hpb=0675f992dbf4a785a05a1baf149c2bce6aa5fe90;p=u-boot diff --git a/tools/mkimage.c b/tools/mkimage.c index b0c98f6f55..28ff35e670 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -113,7 +113,7 @@ static void usage(const char *msg) #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); } @@ -260,6 +260,10 @@ static void process_args(int argc, char **argv) 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); @@ -526,7 +530,7 @@ int main(int argc, char **argv) + 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,