summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d8dabee..252023d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;