This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: RHEL5 - qdisk: fix disk scanning check in sysfs
- From: Lon Hohberger <lon at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 19 May 2009 20:01:30 +0000 (UTC)
- Subject: cluster: RHEL5 - qdisk: fix disk scanning check in sysfs
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7ef5811c939381771d2c144e284c801b5445c909
Commit: 7ef5811c939381771d2c144e284c801b5445c909
Parent: d727e39ecd607b879ec3dc8841d599131ee7638d
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Fri May 15 12:33:27 2009 +0200
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Tue May 19 16:01:12 2009 -0400
qdisk: fix disk scanning check in sysfs
check for correct return code
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Lon Hohberger <lhh@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 9ff4bf6..576ed3f 100644
--- a/cman/qdisk/scandisk.c
+++ b/cman/qdisk/scandisk.c
@@ -589,15 +589,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;