diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c index 8764fef6..88e346ad 100644 --- a/cmds-fi-usage.c +++ b/cmds-fi-usage.c @@ -471,7 +471,7 @@ static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo, printf(" Device allocated:\t\t%*s\n", width, pretty_size_mode(r_total_chunks, unit_mode)); printf(" Device unallocated:\t\t%*s\n", width, - pretty_size_mode(r_total_unused, unit_mode)); + pretty_size_mode(r_total_unused, unit_mode | UNITS_NEGATIVE)); printf(" Device missing:\t\t%*s\n", width, pretty_size_mode(r_total_missing, unit_mode)); printf(" Used:\t\t\t%*s\n", width, @@ -736,8 +736,8 @@ static void _cmd_filesystem_usage_tabular(unsigned unit_mode, unused = get_partition_size(device_info_ptr[i].path) - total_allocated; - table_printf(matrix, unallocated_col, vhdr_skip + i, - ">%s", pretty_size_mode(unused, unit_mode)); + table_printf(matrix, unallocated_col, vhdr_skip + i, ">%s", + pretty_size_mode(unused, unit_mode | UNITS_NEGATIVE)); total_unused += unused; } @@ -771,7 +771,8 @@ static void _cmd_filesystem_usage_tabular(unsigned unit_mode, } table_printf(matrix, unallocated_col, vhdr_skip + device_info_count + 1, - ">%s", pretty_size_mode(total_unused, unit_mode)); + ">%s", + pretty_size_mode(total_unused, unit_mode | UNITS_NEGATIVE)); table_printf(matrix, 1, vhdr_skip + device_info_count + 2, "total_spaces; i++) { @@ -884,7 +885,7 @@ static void _cmd_filesystem_usage_linear(unsigned unit_mode, printf("Unallocated:\n"); print_unused(info_ptr, info_count, device_info_ptr, device_info_count, - unit_mode); + unit_mode | UNITS_NEGATIVE); } static int print_filesystem_usage_by_chunk(int fd, @@ -1027,7 +1028,8 @@ void print_device_chunks(int fd, struct device_info *devinfo, } printf(" Unallocated: %*s%10s\n", (int)(20 - strlen("Unallocated")), "", - pretty_size_mode(devinfo->size - allocated, unit_mode)); + pretty_size_mode(devinfo->size - allocated, + unit_mode | UNITS_NEGATIVE)); } void print_device_sizes(int fd, struct device_info *devinfo, unsigned unit_mode)