From 77f2c84d2f599d86a60586494169dcab17853e3a Mon Sep 17 00:00:00 2001 From: Matthias Eble Date: Mon, 15 Nov 2010 23:59:35 +0100 Subject: Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603) Various values (dused_pct, dfree_pct, inodes_free, inodes_total, ...) are now carried in the parameter_list structure. Assignments have been moved to a subroutine preventing code redundancies. Group metrics are now calculated based on units rather than blocks. This fixes freespace calculation when blocksizes differ within a group. --- lib/utils_disk.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/utils_disk.h') diff --git a/lib/utils_disk.h b/lib/utils_disk.h index f99b9050..83a37639 100644 --- a/lib/utils_disk.h +++ b/lib/utils_disk.h @@ -24,6 +24,10 @@ struct parameter_list char *group; struct mount_entry *best_match; struct parameter_list *name_next; + uintmax_t total, available, available_to_root, used, inodes_free, inodes_total; + double dfree_pct, dused_pct; + double dused_units, dfree_units, dtotal_units; + double dused_inodes_percent, dfree_inodes_percent; }; void np_add_name (struct name_list **list, const char *name); -- cgit v1.2.3-74-g34f1