]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
various: print the image path when setting up of the loopback device fails
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 21 Apr 2021 07:07:30 +0000 (09:07 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Apr 2021 13:11:38 +0000 (15:11 +0200)
src/dissect/dissect.c
src/portable/portable.c
src/shared/dissect-image.c
src/sysext/sysext.c

index f1288b41a7264619f95c4f568a46627809c57aeb..745366837f241118fb969d4657a9944d6379b715 100644 (file)
@@ -774,7 +774,7 @@ static int run(int argc, char *argv[]) {
                         FLAGS_SET(arg_flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
                         &d);
         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(
                         d->fd,
index 0799bff53d136d93c718136deb3399b07f91b659..53c4d8e25b02fcf9873ce66a250dd0dbf8735ce1 100644 (file)
@@ -376,7 +376,7 @@ static int portable_extract_by_path(
                         return r;
 
         } 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 {
                 _cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
                 _cleanup_(rmdir_and_freep) char *tmpdir = NULL;
index b42501445738bf74812db78b479772d16f77c099..05301ef16d17090e649782172b476a1537e80001 100644 (file)
@@ -2741,7 +2741,7 @@ int mount_image_privately_interactively(
                         FLAGS_SET(flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
                         &d);
         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);
         if (r < 0)
index c5fdf99aa7fa57a31fdb46b55970d27d6dc36219..76a21afea619451d7d1f434d3ba1410b4cf3aacb 100644 (file)
@@ -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);
                         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(
                                         d->fd,