From: Karel Zak Date: Tue, 16 Feb 2010 08:43:26 +0000 (+0100) Subject: blkid: report open() errors in low-level probing X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc5d65bf26e805f3afed2bfd7fbb95f30779144;p=util-linux blkid: report open() errors in low-level probing Signed-off-by: Karel Zak --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 28baa2a0..8c66e0a8 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -413,9 +414,10 @@ static int lowprobe_device(blkid_probe pr, const char *devname, char *show[], struct stat st; fd = open(devname, O_RDONLY); - if (fd < 0) + if (fd < 0) { + fprintf(stderr, "error: %s: %s\n", devname, strerror(errno)); return 2; - + } if (blkid_probe_set_device(pr, fd, offset, size)) goto done;