machine-image: properly support searching for images below some --root= path

systemd-sysext supports --root= for everything but the image discovery.
Fix that.
This commit is contained in:
Lennart Poettering
2021-01-19 13:41:42 +01:00
parent 7a87fb6119
commit d577d4a432
13 changed files with 82 additions and 61 deletions
+1 -1
View File
@@ -2940,7 +2940,7 @@ static int determine_names(void) {
if (arg_machine) {
_cleanup_(image_unrefp) Image *i = NULL;
r = image_find(IMAGE_MACHINE, arg_machine, &i);
r = image_find(IMAGE_MACHINE, arg_machine, NULL, &i);
if (r == -ENOENT)
return log_error_errno(r, "No image for machine '%s'.", arg_machine);
if (r < 0)