chiark / gitweb /
hwdb: fix usage
[elogind.git] / src / udev / udevadm-hwdb.c
index 4017526d1cda012a020ae47a0bfc9bb5c8d6bc6e..00c0d3d4c4ac5dba15aabc7782ec6651cda189b7 100644 (file)
@@ -1,7 +1,7 @@
 /***
   This file is part of systemd.
 
-  Copyright 2012 Kay Sievers <kay.sievers@vrfy.org>
+  Copyright 2012 Kay Sievers <kay@vrfy.org>
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
@@ -469,7 +469,7 @@ static int import_file(struct trie *trie, const char *filename) {
 }
 
 static void help(void) {
-        printf("Usage: udevadm hwdb [--create] [--help]\n"
+        printf("Usage: udevadm hwdb OPTIONS\n"
                "  --update            update the hardware database\n"
                "  --test <modalias>   query database and print result\n"
                "  --help\n\n");
@@ -565,10 +565,11 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
                 log_debug("strings dedup'ed: %8zu bytes (%8zu)\n",
                           trie->strings->dedup_len, trie->strings->dedup_count);
 
-                mkdir_parents("/etc/udev/hwdb.bin", 0755);
-                err = trie_store(trie, "/etc/udev/hwdb.bin");
+                mkdir_parents(HWDB_BIN, 0755);
+                err = trie_store(trie, HWDB_BIN);
                 if (err < 0) {
-                        log_error("Failure writing hardware database '%s': %s", "/etc/udev/hwdb.bin", strerror(-err));
+                        log_error("Failure writing hardware database '%s': %s",
+                                  HWDB_BIN, strerror(-err));
                         rc = EXIT_FAILURE;
                 }
         }