- for (i = 0; i <= sargs->total_spaces; i++)
- table_printf(matrix, i + 1, device_info_count + 3, "=");
+ for (i = 0; i < spaceinfos_col; i++) {
+ table_printf(matrix, i, vhdr_skip - 1, "*-");
+ table_printf(matrix, i, vhdr_skip + device_info_count, "*-");
+ }
+
+ for (i = 0, col = spaceinfos_col; i < sargs->total_spaces; i++) {
+ if (sargs->spaces[i].flags & BTRFS_SPACE_INFO_GLOBAL_RSV)
+ continue;
+
+ table_printf(matrix, col, vhdr_skip - 1, "*-");
+ table_printf(matrix, col, vhdr_skip + device_info_count, "*-");
+ col++;
+ }
+ /* One for Unallocated */
+ table_printf(matrix, col, vhdr_skip - 1, "*-");
+ table_printf(matrix, col, vhdr_skip + device_info_count, "*-");