summaryrefslogtreecommitdiff
path: root/src/modules-load
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules-load')
-rw-r--r--src/modules-load/modules-load.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 9cfd292011..b57d806fab 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -62,12 +62,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent) {
_cleanup_fclose_ FILE *f = NULL;
+ _cleanup_free_ char *pp = NULL;
int r;
assert(ctx);
assert(path);
- r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f);
+ r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f, &pp);
if (r < 0) {
if (ignore_enoent && r == -ENOENT)
return 0;
@@ -75,7 +76,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent
return log_error_errno(r, "Failed to open %s: %m", path);
}
- log_debug("apply: %s", path);
+ log_debug("apply: %s", pp);
for (;;) {
_cleanup_free_ char *line = NULL;
char *l;
@@ -83,7 +84,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent
k = read_line(f, LONG_LINE_MAX, &line);
if (k < 0)
- return log_error_errno(k, "Failed to read file '%s': %m", path);
+ return log_error_errno(k, "Failed to read file '%s': %m", pp);
if (k == 0)
break;