This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - qdisk: fix disk scanning check in sysfs
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 15 May 2009 10:34:12 +0000 (UTC)
- Subject: cluster: STABLE3 - qdisk: fix disk scanning check in sysfs
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=38fdddcb8d9efb2bc4dc22aed61ed940137fb0c8
Commit: 38fdddcb8d9efb2bc4dc22aed61ed940137fb0c8
Parent: b879251ad623b57193721df4dd97736c8a5ed2ec
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Fri May 15 12:33:27 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri May 15 12:33:27 2009 +0200
qdisk: fix disk scanning check in sysfs
check for correct return code
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/qdisk/scandisk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cman/qdisk/scandisk.c b/cman/qdisk/scandisk.c
index 1eaa75e..0b1688f 100644
--- a/cman/qdisk/scandisk.c
+++ b/cman/qdisk/scandisk.c
@@ -574,15 +574,15 @@ static int sysfs_is_disk(char *path)
goto found;
snprintf(newpath, sizeof(newpath), "%s/../device/media", path);
- if (lstat(newpath, &sb))
+ if (!lstat(newpath, &sb))
goto found;
snprintf(newpath, sizeof(newpath), "%s/device/devtype", path);
- if (lstat(newpath, &sb))
+ if (!lstat(newpath, &sb))
return 1;
snprintf(newpath, sizeof(newpath), "%s/../device/devtype", path);
- if (lstat(newpath, &sb))
+ if (!lstat(newpath, &sb))
return 1;
return -1;