[PATCH 14/37] autofs-5.1.2 - fix count_mounts() function

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

 



count_mounts() gets the number of mounts wrong, make it include the
base directory also.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG          |    1 +
 daemon/automount.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index 551443a..5fcd123 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@ xx/xx/2016 autofs-5.1.3
 - Fix typos in error messages.
 - Fix fgets(3) size argument (another one).
 - fix short memory allocation in lookup_amd_instance().
+- fix count_mounts() function.
 
 15/06/2016 autofs-5.1.2
 =======================
diff --git a/daemon/automount.c b/daemon/automount.c
index e51909c..8d98054 100644
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -420,7 +420,7 @@ int count_mounts(struct autofs_point *ap, const char *path, dev_t dev)
 	counter.count = 0;
 	counter.dev = dev;
 	
-	if (walk_tree(path, counter_fn, 0, ap, &counter) == -1)
+	if (walk_tree(path, counter_fn, 1, ap, &counter) == -1)
 		return -1;
 
 	return counter.count;

--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux