[PATCH 1/5] multipathd: document return values for check_path()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



check_path() should return '1' if the path has been checked,
and '0' otherwise. So fixup missing return values and document
it properly.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 multipathd/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index fd70b70..bf34a76 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1107,6 +1107,9 @@ int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh)
 	return 0;
 }
 
+/*
+ * Returns '1' if the path has been checked, '0' otherwise
+ */
 int
 check_path (struct vectors * vecs, struct path * pp)
 {
@@ -1131,7 +1134,7 @@ check_path (struct vectors * vecs, struct path * pp)
 	if (newstate == PATH_REMOVED) {
 		condlog(2, "%s: remove path (checker)", pp->dev);
 		ev_remove_path(pp, vecs);
-		return;
+		return 0;
 	}
 	if (newstate == PATH_UP)
 		newstate = get_state(pp, 1);
@@ -1152,7 +1155,7 @@ check_path (struct vectors * vecs, struct path * pp)
 				pp->tick = 1;
 			}
 		}
-		return;
+		return 0;
 	}
 	/*
 	 * Async IO in flight. Keep the previous path state
-- 
1.7.12.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux