From: Yu Watanabe Date: Tue, 13 Jan 2026 08:45:35 +0000 (+0900) Subject: udevadm: log path prefixed with the specified root directory X-Git-Tag: v260-rc1~383^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f25d9e7c0e5419159e780b687f33fbd0930d6014;p=thirdparty%2Fsystemd.git udevadm: log path prefixed with the specified root directory --- diff --git a/src/udev/udevadm-util.c b/src/udev/udevadm-util.c index 04005cc3666..4ad4b1e9237 100644 --- a/src/udev/udevadm-util.c +++ b/src/udev/udevadm-util.c @@ -256,7 +256,7 @@ static int search_rules_file_in_conf_dirs(const char *s, const char *root, ConfF if (r == -ENOENT) continue; if (r < 0) - return log_error_errno(r, "Failed to chase \"%s\": %m", path); + return log_error_errno(r, "Failed to chase '%s%s': %m", empty_to_root(root), skip_leading_slash(path)); if (!GREEDY_REALLOC_APPEND(*files, *n_files, &c, 1)) return log_oom(); @@ -296,7 +296,7 @@ static int search_rules_file(const char *s, const char *root, ConfFile ***files, } if (r != -EISDIR) - return log_error_errno(r, "Failed to chase \"%s\": %m", s); + return log_error_errno(r, "Failed to chase '%s%s': %m", empty_to_root(root), skip_leading_slash(s)); /* If a directory is specified, then find all rules file in the directory. */ ConfFile **f = NULL; @@ -306,7 +306,7 @@ static int search_rules_file(const char *s, const char *root, ConfFile ***files, r = conf_files_list_strv_full(".rules", root, CONF_FILES_REGULAR, (const char* const*) STRV_MAKE_CONST(s), &f, &n); if (r < 0) - return log_error_errno(r, "Failed to enumerate rules files in '%s': %m", s); + return log_error_errno(r, "Failed to enumerate rules files in '%s%s': %m", empty_to_root(root), skip_leading_slash(s)); if (!GREEDY_REALLOC_APPEND(*files, *n_files, f, n)) return log_oom();