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=fd34358a6086b1469ad1e7ecd67ec0f0b87fa874;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;