diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-05 15:39:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-24 17:01:57 +0200 |
commit | 5ef46e5f6598d74acbfe963d4feb8dca4e9486b4 (patch) | |
tree | 683837dcfba3b8109cb01b9d3c120e1060ba1389 /src/machine/machined-dbus.c | |
parent | conf-files: beef up conf-files.[ch] a bit (diff) | |
download | systemd-5ef46e5f6598d74acbfe963d4feb8dca4e9486b4.tar.xz systemd-5ef46e5f6598d74acbfe963d4feb8dca4e9486b4.zip |
machine-image: introduce two different classes of images
This distuingishes two different classes of images, one for the purpose
of npsawn-like containers, i.e. "machines", and one for portable
services.
This distinction is mostly about search paths. We look for machine
images in /var/lib/machines and for portable images in
/var/lib/portables.
Diffstat (limited to 'src/machine/machined-dbus.c')
-rw-r--r-- | src/machine/machined-dbus.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 2ac4689ba1..5cf0aa8838 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -145,7 +145,7 @@ static int method_get_image(sd_bus_message *message, void *userdata, sd_bus_erro if (r < 0) return r; - r = image_find(name, NULL); + r = image_find(IMAGE_MACHINE, name, NULL); if (r == 0) return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_IMAGE, "No image '%s' known", name); if (r < 0) @@ -545,7 +545,7 @@ static int method_list_images(sd_bus_message *message, void *userdata, sd_bus_er if (!images) return -ENOMEM; - r = image_discover(images); + r = image_discover(IMAGE_MACHINE, images); if (r < 0) return r; @@ -738,7 +738,7 @@ static int method_remove_image(sd_bus_message *message, void *userdata, sd_bus_e if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -762,7 +762,7 @@ static int method_rename_image(sd_bus_message *message, void *userdata, sd_bus_e if (!image_name_is_valid(old_name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", old_name); - r = image_find(old_name, &i); + r = image_find(IMAGE_MACHINE, old_name, &i); if (r < 0) return r; if (r == 0) @@ -786,7 +786,7 @@ static int method_clone_image(sd_bus_message *message, void *userdata, sd_bus_er if (!image_name_is_valid(old_name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", old_name); - r = image_find(old_name, &i); + r = image_find(IMAGE_MACHINE, old_name, &i); if (r < 0) return r; if (r == 0) @@ -810,7 +810,7 @@ static int method_mark_image_read_only(sd_bus_message *message, void *userdata, if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -834,7 +834,7 @@ static int method_get_image_hostname(sd_bus_message *message, void *userdata, sd if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -858,7 +858,7 @@ static int method_get_image_machine_id(sd_bus_message *message, void *userdata, if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -882,7 +882,7 @@ static int method_get_image_machine_info(sd_bus_message *message, void *userdata if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -906,7 +906,7 @@ static int method_get_image_os_release(sd_bus_message *message, void *userdata, if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) @@ -1070,7 +1070,7 @@ static int method_clean_pool(sd_bus_message *message, void *userdata, sd_bus_err goto child_fail; } - r = image_discover(images); + r = image_discover(IMAGE_MACHINE, images); if (r < 0) goto child_fail; @@ -1211,7 +1211,7 @@ static int method_set_image_limit(sd_bus_message *message, void *userdata, sd_bu if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(name, &i); + r = image_find(IMAGE_MACHINE, name, &i); if (r < 0) return r; if (r == 0) |