machine-image: use pretty names if we already have them and validated them
This commit is contained in:
parent
4756c94e5e
commit
225219e504
|
@ -412,7 +412,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
|
||||||
return -errno;
|
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)) {
|
if (IN_SET(r, 0, -ENOENT)) {
|
||||||
_cleanup_free_ char *raw = NULL;
|
_cleanup_free_ char *raw = NULL;
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
|
||||||
if (!raw)
|
if (!raw)
|
||||||
return -ENOMEM;
|
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))
|
if (IN_SET(r, 0, -ENOENT))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue