public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - qdisk: fix disk scanning check in sysfs
@ 2009-05-15 10:37 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-05-15 10:37 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9fafcadd76709f24b86e8888e6987b6edebac265
Commit: 9fafcadd76709f24b86e8888e6987b6edebac265
Parent: 72d3438fe92326b28981be3d978585591efd65ae
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:36:26 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-15 10:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-15 10:37 cluster: master - qdisk: fix disk scanning check in sysfs Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).