From a434e2398ae9ac5ccf3ec5ec7d50638a38ae95f6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 13 Jan 2015 09:53:46 +0100 Subject: [PATCH] raw: fix raw query Bug introduced by commit cd121363. References: https://bugzilla.redhat.com/show_bug.cgi?id=1181444 Signed-off-by: Karel Zak --- disk-utils/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-utils/raw.c b/disk-utils/raw.c index cc6690145..d29ff1ba3 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))