diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-17 07:31:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-17 16:34:30 +0200 |
commit | d8f173fd2ee9ee60affa1a4d1a89f2501977fb0b (patch) | |
tree | d873f508a399aad247ba138dc0af81b02b8ef0e3 | |
parent | 9ba0bc4e0f3cc606635547c6215f5af8982851df (diff) |
keymap: add --version option
-rw-r--r-- | src/udev/keymap/keymap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/udev/keymap/keymap.c b/src/udev/keymap/keymap.c index 051aa42552..5cbce86db1 100644 --- a/src/udev/keymap/keymap.c +++ b/src/udev/keymap/keymap.c @@ -362,8 +362,13 @@ static void help(int error) int main(int argc, char **argv) { + enum { + ARG_VERSION = 0x100, + }; + static const struct option options[] = { { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, ARG_VERSION }, { "interactive", no_argument, NULL, 'i' }, {} }; @@ -382,6 +387,10 @@ int main(int argc, char **argv) case 'h': help(0); + case ARG_VERSION: + puts(PACKAGE_STRING); + exit(0); + case 'i': opt_interactive = 1; break; |