autofs-5.1.2 - fix count_mounts() function From: Ian Kent count_mounts() gets the number of mounts wrong, make it include the base directory also. Signed-off-by: Ian Kent --- 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;