chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ba0bc4
)
keymap: add --version option
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 17 Jul 2012 05:31:48 +0000
(07:31 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jul 2012 14:34:30 +0000
(16:34 +0200)
src/udev/keymap/keymap.c
patch
|
blob
|
history
diff --git
a/src/udev/keymap/keymap.c
b/src/udev/keymap/keymap.c
index 051aa42552f2e8428349ff12aab27c7219d14c7d..5cbce86db1b0f9f3cf8ce5cadbcbbf0f73448cfc 100644
(file)
--- 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;