Blame SOURCES/autofs-5.1.2-fix-count_mounts-function.patch

306fa1
autofs-5.1.2 - fix count_mounts() function
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
count_mounts() gets the number of mounts wrong, make it include the
306fa1
base directory also.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG          |    1 +
306fa1
 daemon/automount.c |    2 +-
306fa1
 2 files changed, 2 insertions(+), 1 deletion(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -219,6 +219,7 @@
306fa1
 - honor last rw in mount options when doing a bind mount.
306fa1
 - update and add README for old autofs schema.
306fa1
 - fix short memory allocation in lookup_amd_instance().
306fa1
+- fix count_mounts() function.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/daemon/automount.c
306fa1
+++ autofs-5.0.7/daemon/automount.c
306fa1
@@ -392,7 +392,7 @@ int count_mounts(struct autofs_point *ap
306fa1
 	counter.count = 0;
306fa1
 	counter.dev = dev;
306fa1
 	
306fa1
-	if (walk_tree(path, counter_fn, 0, ap, &counter) == -1)
306fa1
+	if (walk_tree(path, counter_fn, 1, ap, &counter) == -1)
306fa1
 		return -1;
306fa1
 
306fa1
 	return counter.count;