[monitoring-plugins] fix check_disk problems with gnulib update

RincewindsHat git at monitoring-plugins.org
Mon Feb 7 14:40:11 CET 2022


 Module: monitoring-plugins
 Branch: update_gnulib_2021
 Commit: 1ac7e817401771d2c32f7bbb668cf99a1d0b6657
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Wed Nov 17 01:16:17 2021 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=1ac7e81

fix check_disk problems with gnulib update

---

 plugins/check_disk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 66c5dd3..a023e89 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -1107,7 +1107,9 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
   p->dfree_units = p->available*fsp->fsu_blocksize/mult;
   p->dtotal_units = p->total*fsp->fsu_blocksize/mult;
   /* Free file nodes. Not sure the workaround is required, but in case...*/
-  p->inodes_free  = fsp->fsu_favail > fsp->fsu_ffree ? 0 : fsp->fsu_favail;
+  /* p->inodes_free  = fsp->fsu_favail > fsp->fsu_ffree ? 0 : fsp->fsu_favail; */
+  /* did the above ever work correctly? */
+  p->inodes_free  = fsp->fsu_ffree;
   p->inodes_free_to_root  = fsp->fsu_ffree; /* Free file nodes for root. */
   p->inodes_used = fsp->fsu_files - fsp->fsu_ffree;
   if (freespace_ignore_reserved) {



More information about the Commits mailing list