]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine-image: use pretty names if we already have them and validated them
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Apr 2018 16:01:54 +0000 (18:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 May 2018 15:01:57 +0000 (17:01 +0200)
src/shared/machine-image.c

index 853521e6d674aa5b4850fd51555b3719ea6da365..6fabe4cf7eb4efbfa9661e78c1adaad61ac140e0 100644 (file)
@@ -412,7 +412,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
                         return -errno;
                 }
 
-                r = image_make(NULL, dirfd(d), path, name, ret);
+                r = image_make(name, dirfd(d), path, name, ret);
                 if (IN_SET(r, 0, -ENOENT)) {
                         _cleanup_free_ char *raw = NULL;
 
@@ -420,7 +420,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
                         if (!raw)
                                 return -ENOMEM;
 
-                        r = image_make(NULL, dirfd(d), path, raw, ret);
+                        r = image_make(name, dirfd(d), path, raw, ret);
                         if (IN_SET(r, 0, -ENOENT))
                                 continue;
                 }