From 8b63362d4190f5fb8202baefa3ee200cd3541675 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 30 Jan 2022 11:19:50 +0100 Subject: [PATCH] Adding debian/patches/12_check_disk_fix_btrfs (Closes: #800345) --- debian/patches/12_check_disk_fix_btrfs | 26 ++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 27 insertions(+) create mode 100644 debian/patches/12_check_disk_fix_btrfs diff --git a/debian/patches/12_check_disk_fix_btrfs b/debian/patches/12_check_disk_fix_btrfs new file mode 100644 index 0000000..4a8fbfc --- /dev/null +++ b/debian/patches/12_check_disk_fix_btrfs @@ -0,0 +1,26 @@ +From 23436a18516e66469aeb4d81329d62ee4bfa7a51 Mon Sep 17 00:00:00 2001 +From: Klaus Ethgen +Date: Wed, 28 Oct 2015 00:38:47 +0100 +Subject: [PATCH] Fixing the stuff that is broken on btrfs + +(Closes #1357) +--- + plugins/check_disk.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/plugins/check_disk.c b/plugins/check_disk.c +index 874a0ee0c..b3386842c 100644 +--- a/plugins/check_disk.c ++++ b/plugins/check_disk.c +@@ -1038,10 +1038,7 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) { + + void + get_path_stats (struct parameter_list *p, struct fs_usage *fsp) { +- /* 2007-12-08 - Workaround for Gnulib reporting insanely high available +- * space on BSD (the actual value should be negative but fsp->fsu_bavail +- * is unsigned) */ +- p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail; ++ p->available = fsp->fsu_bavail; + p->available_to_root = fsp->fsu_bfree; + p->used = fsp->fsu_blocks - fsp->fsu_bfree; + if (freespace_ignore_reserved) { diff --git a/debian/patches/series b/debian/patches/series index 94c7545..87d76c0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ # commited upstream 10_check_curl_header 11_check_icmp_source_ip +12_check_disk_fix_btrfs