diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-02-24 23:43:36 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2007-02-24 23:43:36 +0100 |
commit | 841e168c76403c058437bceda4e679dd7c82ae79 (patch) | |
tree | d5a3ef3ed97346ea8dfe7b75b855e55b3fc03180 /udevd.c | |
parent | 915fde17387f7245164fbda21a0f5bbc185f7dc2 (diff) |
add option --version to udevd
Diffstat (limited to 'udevd.c')
-rw-r--r-- | udevd.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -943,6 +943,7 @@ int main(int argc, char *argv[], char *envp[]) { "debug-trace", 0, NULL, 't' }, { "verbose", 0, NULL, 'v' }, { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, {} }; int rc = 1; @@ -955,7 +956,7 @@ int main(int argc, char *argv[], char *envp[]) /* parse commandline options */ while (1) { - option = getopt_long(argc, argv, "dtvh", options, NULL); + option = getopt_long(argc, argv, "dtvhV", options, NULL); if (option == -1) break; @@ -972,7 +973,10 @@ int main(int argc, char *argv[], char *envp[]) udev_log_priority = LOG_INFO; break; case 'h': - printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose]\n"); + printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n"); + goto exit; + case 'V': + printf("%s\n", UDEV_VERSION); goto exit; default: goto exit; |