From: Karel Zak Date: Tue, 13 Jan 2015 08:53:46 +0000 (+0100) Subject: raw: fix raw query X-Git-Tag: v2.26-rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a434e2398ae9ac5ccf3ec5ec7d50638a38ae95f6;p=thirdparty%2Futil-linux.git raw: fix raw query Bug introduced by commit cd121363. References: https://bugzilla.redhat.com/show_bug.cgi?id=1181444 Signed-off-by: Karel Zak --- diff --git a/disk-utils/raw.c b/disk-utils/raw.c index cc6690145e..d29ff1ba3d 100644 --- a/disk-utils/raw.c +++ b/disk-utils/raw.c @@ -224,7 +224,7 @@ static int query(int minor_raw, const char *raw_name, int quiet) if (raw_name) { struct stat statbuf; - if (!stat(raw_name, &statbuf)) + if (stat(raw_name, &statbuf) != 0) err(EXIT_RAW_ACCESS, _("Cannot locate raw device '%s'"), raw_name); if (!S_ISCHR(statbuf.st_mode))