]> git.proxmox.com Git - systemd.git/blobdiff - src/binfmt/binfmt.c
New upstream version 249~rc1
[systemd.git] / src / binfmt / binfmt.c
index f6b72e0bae865f3402716938f4298583aa4545e0..29530bb691c6c22c398a3067836ea6c4c7a0a0ed 100644 (file)
@@ -65,11 +65,12 @@ static int apply_rule(const char *rule) {
 
 static int apply_file(const char *path, bool ignore_enoent) {
         _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_free_ char *pp = NULL;
         int r;
 
         assert(path);
 
-        r = search_and_fopen(path, "re", NULL, (const char**) CONF_PATHS_STRV("binfmt.d"), &f);
+        r = search_and_fopen(path, "re", NULL, (const char**) CONF_PATHS_STRV("binfmt.d"), &f, &pp);
         if (r < 0) {
                 if (ignore_enoent && r == -ENOENT)
                         return 0;
@@ -77,7 +78,7 @@ static int apply_file(const char *path, bool ignore_enoent) {
                 return log_error_errno(r, "Failed to open file '%s': %m", path);
         }
 
-        log_debug("apply: %s", path);
+        log_debug("apply: %s", pp);
         for (;;) {
                 _cleanup_free_ char *line = NULL;
                 char *p;
@@ -85,7 +86,7 @@ static int apply_file(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;