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

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