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.
This commit is contained in:
+2
-2
@@ -75,7 +75,7 @@ static int import_tar(int argc, char *argv[], void *userdata) {
|
||||
}
|
||||
|
||||
if (!arg_force) {
|
||||
r = image_find(local, NULL);
|
||||
r = image_find(IMAGE_MACHINE, local, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to check whether image '%s' exists: %m", local);
|
||||
else if (r > 0) {
|
||||
@@ -170,7 +170,7 @@ static int import_raw(int argc, char *argv[], void *userdata) {
|
||||
}
|
||||
|
||||
if (!arg_force) {
|
||||
r = image_find(local, NULL);
|
||||
r = image_find(IMAGE_MACHINE, local, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to check whether image '%s' exists: %m", local);
|
||||
else if (r > 0) {
|
||||
|
||||
Reference in New Issue
Block a user