X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudevadm-hwdb.c;h=596a89b6400438d14507154875c44a4a7a8b0a5f;hb=7850b3b83791ba0e2377ba40383c5abc258b839d;hp=f620aa79dcac077bf5e537df19ff227c6b5491b3;hpb=23b7245397ac3d21b2386e7b33d9e4ae3db3c8a1;p=elogind.git diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index f620aa79d..596a89b64 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -1,7 +1,7 @@ /*** This file is part of systemd. - Copyright 2012 Kay Sievers + Copyright 2012 Kay Sievers 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 query database and print result\n" " --help\n\n"); @@ -537,7 +537,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { } trie->nodes_count++; - err = conf_files_list_strv(&files, ".hwdb", (const char **)conf_file_dirs); + err = conf_files_list_strv(&files, ".hwdb", NULL, (const char **)conf_file_dirs); if (err < 0) { log_error("failed to enumerate hwdb files: %s\n", strerror(-err)); rc = EXIT_FAILURE; @@ -552,17 +552,23 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { strbuf_complete(trie->strings); log_debug("=== trie in-memory ===\n"); - log_debug("nodes: %8zu bytes (%8zu)\n", trie->nodes_count * sizeof(struct trie_node), trie->nodes_count); - log_debug("children arrays: %8zu bytes (%8zu)\n", trie->children_count * sizeof(struct trie_child_entry), trie->children_count); - log_debug("values arrays: %8zu bytes (%8zu)\n", trie->values_count * sizeof(struct trie_value_entry), trie->values_count); - log_debug("strings: %8zu bytes\n", trie->strings->len); - log_debug("strings incoming: %8zu bytes (%8zu)\n", trie->strings->in_len, trie->strings->in_count); - log_debug("strings dedup'ed: %8zu bytes (%8zu)\n", trie->strings->dedup_len, trie->strings->dedup_count); + log_debug("nodes: %8zu bytes (%8zu)\n", + trie->nodes_count * sizeof(struct trie_node), trie->nodes_count); + log_debug("children arrays: %8zu bytes (%8zu)\n", + trie->children_count * sizeof(struct trie_child_entry), trie->children_count); + log_debug("values arrays: %8zu bytes (%8zu)\n", + trie->values_count * sizeof(struct trie_value_entry), trie->values_count); + log_debug("strings: %8zu bytes\n", + trie->strings->len); + log_debug("strings incoming: %8zu bytes (%8zu)\n", + trie->strings->in_len, trie->strings->in_count); + 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"); if (err < 0) { - log_error("Failure writing hardware database '%s': %s", "/etc/udev/hwdb.bin", strerror(-err)); + log_error("Failure writing database /etc/udev/hwdb.bin: %s", strerror(-err)); rc = EXIT_FAILURE; } }