mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
various: print the image path when setting up of the loopback device fails
This commit is contained in:
parent
409607c111
commit
7b87fe4c30
@ -774,7 +774,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
FLAGS_SET(arg_flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
|
FLAGS_SET(arg_flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
|
||||||
&d);
|
&d);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to set up loopback device: %m");
|
return log_error_errno(r, "Failed to set up loopback device for %s: %m", arg_image);
|
||||||
|
|
||||||
r = dissect_image_and_warn(
|
r = dissect_image_and_warn(
|
||||||
d->fd,
|
d->fd,
|
||||||
|
@ -376,7 +376,7 @@ static int portable_extract_by_path(
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
} else if (r < 0)
|
} else if (r < 0)
|
||||||
return log_debug_errno(r, "Failed to set up loopback device: %m");
|
return log_debug_errno(r, "Failed to set up loopback device for %s: %m", path);
|
||||||
else {
|
else {
|
||||||
_cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
|
_cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
|
||||||
_cleanup_(rmdir_and_freep) char *tmpdir = NULL;
|
_cleanup_(rmdir_and_freep) char *tmpdir = NULL;
|
||||||
|
@ -2741,7 +2741,7 @@ int mount_image_privately_interactively(
|
|||||||
FLAGS_SET(flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
|
FLAGS_SET(flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
|
||||||
&d);
|
&d);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to set up loopback device: %m");
|
return log_error_errno(r, "Failed to set up loopback device for %s: %m", image);
|
||||||
|
|
||||||
r = dissect_image_and_warn(d->fd, image, &verity, NULL, d->uevent_seqnum_not_before, d->timestamp_not_before, flags, &dissected_image);
|
r = dissect_image_and_warn(d->fd, image, &verity, NULL, d->uevent_seqnum_not_before, d->timestamp_not_before, flags, &dissected_image);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -525,7 +525,7 @@ static int merge_subprocess(Hashmap *images, const char *workspace) {
|
|||||||
|
|
||||||
r = loop_device_make_by_path(img->path, O_RDONLY, 0, &d);
|
r = loop_device_make_by_path(img->path, O_RDONLY, 0, &d);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to set up loopback device: %m");
|
return log_error_errno(r, "Failed to set up loopback device for %s: %m", img->path);
|
||||||
|
|
||||||
r = dissect_image_and_warn(
|
r = dissect_image_and_warn(
|
||||||
d->fd,
|
d->fd,
|
||||||
|
Loading…
Reference in New Issue
Block a user