]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: more verbose failed setup error mesage
authorKarel Zak <kzak@redhat.com>
Mon, 28 May 2012 09:36:59 +0000 (11:36 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 28 May 2012 09:36:59 +0000 (11:36 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.c

index 17838d84216a8ca3717a7e3d1ff90449541874d2..4f44b9b14e9be745280290ab761754ab1884eaae 100644 (file)
@@ -372,7 +372,9 @@ int main(int argc, char **argv)
                        if (res == 0)
                                break;                  /* success */
                        if (errno != EBUSY) {
-                               warn(_("failed to setup loop device"));
+                               warn(_("%s: failed to setup loop device"),
+                                       hasdev && loopcxt_get_fd(&lc) < 0 ?
+                                           loopcxt_get_device(&lc) : file);
                                break;
                        }
                } while (hasdev == 0);