dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
05ad79
diff -up util-linux-2.23.2/disk-utils/raw.c.kzak util-linux-2.23.2/disk-utils/raw.c
05ad79
--- util-linux-2.23.2/disk-utils/raw.c.kzak	2013-06-13 09:46:10.382650297 +0200
05ad79
+++ util-linux-2.23.2/disk-utils/raw.c	2015-01-13 14:51:24.877755962 +0100
05ad79
@@ -220,7 +220,7 @@ static int query(int minor_raw, const ch
05ad79
 	if (raw_name) {
05ad79
 		struct stat statbuf;
05ad79
 
05ad79
-		if (!stat(raw_name, &statbuf))
05ad79
+		if (stat(raw_name, &statbuf) != 0)
05ad79
 			err(EXIT_RAW_ACCESS,
05ad79
 			    _("Cannot locate raw device '%s'"), raw_name);
05ad79
 		if (!S_ISCHR(statbuf.st_mode))