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

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