diff options
author | Martin Szulecki | 2014-03-27 10:23:22 +0100 |
---|---|---|
committer | Martin Szulecki | 2014-03-27 10:23:22 +0100 |
commit | c92b4f59aba053a3df1ae67c49403122650ad996 (patch) | |
tree | 422e35b17b4d9ca7ca256d63eb16b579f4a89802 /src/main.c | |
parent | 249ab2aee2c9692895d0adb676e22c592ea457a2 (diff) | |
download | usbmuxd-c92b4f59aba053a3df1ae67c49403122650ad996.tar.gz usbmuxd-c92b4f59aba053a3df1ae67c49403122650ad996.tar.bz2 |
Add "--version" option to print version number and exit, useful for bug reports
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -357,6 +357,7 @@ static void usage() printf(" \t\tconnected (must be in udev mode).\n"); printf(" -X, --force-exit\tTell a running instance to exit, even if there are still\n"); printf(" \tdevices connected (always works).\n"); + printf(" -V, --version\t\tPrint version information and exit.\n"); printf("\n"); } @@ -370,6 +371,7 @@ static void parse_opts(int argc, char **argv) {"udev", 0, NULL, 'u'}, {"exit", 0, NULL, 'x'}, {"force-exit", 0, NULL, 'X'}, + {"version", 0, NULL, 'V'}, {NULL, 0, NULL, 0} }; int c; @@ -390,6 +392,9 @@ static void parse_opts(int argc, char **argv) case 'v': ++verbose; break; + case 'V': + printf("%s\n", PACKAGE_STRING); + exit(0); case 'U': drop_privileges = 1; drop_user = optarg; |