src/udev/udevadm-hwdb.c: rename variable to match upstream

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
Anthony G. Basile 2013-07-30 14:34:10 -04:00
parent 6284c1ca41
commit ccc3016682
2 changed files with 8 additions and 9 deletions

View File

@ -546,7 +546,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
{}
};
const char *test = NULL;
const char *root_path = NULL;
const char *root = "";
char *udev_hwdb_path = UDEV_HWDB_BIN;
bool update = false;
struct trie *trie = NULL;
@ -568,7 +568,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
test = optarg;
break;
case 'r':
root_path = optarg;
root = optarg;
break;
case 'h':
help();
@ -605,7 +605,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
}
trie->nodes_count++;
err = conf_files_list_strv(&files, ".hwdb", root_path, (const char **)conf_file_dirs);
err = conf_files_list_strv(&files, ".hwdb", root, conf_file_dirs);
if (err < 0) {
log_error("failed to enumerate hwdb files: %s\n", strerror(-err));
rc = EXIT_FAILURE;
@ -633,9 +633,9 @@ 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);
if (root_path) {
if (root) {
if (asprintf(&udev_hwdb_path,
"%s/%s", root_path, udev_hwdb_path) < 0) {
"%s/%s", root, udev_hwdb_path) < 0) {
rc = EXIT_FAILURE;
goto out;
}
@ -644,13 +644,13 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
mkdir_parents(udev_hwdb_path, 0755);
err = trie_store(trie, udev_hwdb_path);
if (root_path) {
if (root) {
free(udev_hwdb_path);
}
if (err < 0) {
log_error("Failure writing hardware database '%s': %s",
udev_hwdb_path, strerror(-err));
log_error("Failure writing database %s: %s",
udev_hwdb_path, strerror(-err));
rc = EXIT_FAILURE;
}
}

View File

@ -162,7 +162,6 @@ static void worker_cleanup(struct worker *worker)
udev_monitor_unref(worker->monitor);
children--;
free(worker);
worker = NULL;
}
static void worker_unref(struct worker *worker)