raw: fix raw query

Bug introduced by commit cd121363.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1181444
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2015-01-13 09:53:46 +01:00
parent 9f109204b2
commit a434e2398a
1 changed files with 1 additions and 1 deletions

View File

@ -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))