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:
parent
9f109204b2
commit
a434e2398a
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue