X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-sign.c;h=76abce1e94f84013f6364c3a38e3bfa9fca0d446;hb=2a319cf90daa6e3b01e8139923f7073e1c9bcf28;hp=5a5d0192caf956c870832d49bbe5ff78a7893bd8;hpb=189415eece11c543e1ccb95dff32695ddc383565;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-sign.c b/src/wgtpkg-sign.c index 5a5d019..76abce1 100644 --- a/src/wgtpkg-sign.c +++ b/src/wgtpkg-sign.c @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright (C) 2015-2019 IoT.bzh author: José Bollo @@ -60,6 +60,20 @@ static unsigned int get_number(const char *value) return (unsigned int)val; } +static void version() +{ + printf( + "\n" + " %s version="AFM_VERSION"\n" + "\n" + " Copyright (C) 2015-2019 \"IoT.bzh\"\n" + " AFB comes with ABSOLUTELY NO WARRANTY.\n" + " Licence Apache 2\n" + "\n", + appname + ); +} + static void usage() { printf( @@ -72,6 +86,7 @@ static void usage() " -f force overwriting\n" " -q quiet\n" " -v verbose\n" + " -V version\n" "\n", appname ); @@ -86,6 +101,7 @@ static struct option options[] = { { "help", no_argument, NULL, 'h' }, { "quiet", no_argument, NULL, 'q' }, { "verbose", no_argument, NULL, 'v' }, + { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } }; @@ -103,7 +119,7 @@ int main(int ac, char **av) number = UINT_MAX; keyfile = directory = NULL; for (;;) { - i = getopt_long(ac, av, "hfqvak:c:d:", options, NULL); + i = getopt_long(ac, av, "hfqvVak:c:d:", options, NULL); if (i < 0) break; switch (i) { @@ -119,6 +135,7 @@ int main(int ac, char **av) case 'f': force = 1; continue; case 'a': author = 1; continue; case 'h': usage(); return 0; + case 'V': version(); return 0; case 'q': if (verbosity) verbosity--;