]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/mkimage.c
mkimage: add "-V" option to print version information
[karo-tx-uboot.git] / tools / mkimage.c
index f5859d77642152a78751d4b7ce79255c485e6e5b..60f726303c4f356b4873b4b148f7ebc15f4024f9 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "mkimage.h"
 #include <image.h>
+#include <version.h>
 
 static void copy_file(int, const char *, int);
 static void usage(void);
@@ -246,6 +247,9 @@ main (int argc, char **argv)
                        case 'v':
                                params.vflag++;
                                break;
+                       case 'V':
+                               printf("mkimage version %s\n", PLAIN_VERSION);
+                               exit(EXIT_SUCCESS);
                        case 'x':
                                params.xflag++;
                                break;
@@ -590,6 +594,8 @@ usage ()
                params.cmdname);
        fprintf (stderr, "       %s [-D dtc_options] -f fit-image.its fit-image\n",
                params.cmdname);
+       fprintf (stderr, "       %s -V ==> print version information and exit\n",
+               params.cmdname);
 
        exit (EXIT_FAILURE);
 }