summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev.c b/udev.c
index 507f2be943..b1ba1435e7 100644
--- a/udev.c
+++ b/udev.c
@@ -107,8 +107,14 @@ int main(int argc, char *argv[], char *envp[])
const char *devpath = getenv("DEVPATH");
const char *subsystem = argv[1];
- dbg("version %s", UDEV_VERSION);
+ if (argc == 2 && strcmp(argv[1], "-V") == 0) {
+ printf("%s\n", UDEV_VERSION);
+ exit(0);
+ }
+
logging_init("udev");
+ dbg("version %s", UDEV_VERSION);
+
udev_init_config();
/* set signal handlers */