return sargs;
}
-/* Not used, keep for later */
-#if 0
/*
* This function computes the space occuped by a *single* RAID5/RAID6 chunk.
* The computation is performed on the basis of the number of stripes
free(info_ptr);
return 0;
-
}
static int _cmd_disk_free(int fd, char *path, int mode)
else
width = 18;
- printf("Disk size:\t\t%*s\n", width,
+ printf("Overall:\n");
+
+ printf(" Device size:\t\t%*s\n", width,
df_pretty_sizes(total_disk, mode));
- printf("Disk allocated:\t\t%*s\n", width,
+ printf(" Device allocated:\t\t%*s\n", width,
df_pretty_sizes(total_chunks, mode));
- printf("Disk unallocated:\t%*s\n", width,
+ printf(" Device unallocated:\t\t%*s\n", width,
df_pretty_sizes(total_disk-total_chunks, mode));
- printf("Used:\t\t\t%*s\n", width,
+ printf(" Used:\t\t\t%*s\n", width,
df_pretty_sizes(total_used, mode));
- printf("Free (Estimated):\t%*s\t(",
+ printf(" Free (Estimated):\t\t%*s\t(",
width,
df_pretty_sizes((u64)(K*total_disk-total_used), mode));
printf("Max: %s, ",
df_pretty_sizes(total_disk-total_chunks+total_free, mode));
printf("min: %s)\n",
df_pretty_sizes((total_disk-total_chunks)/2+total_free, mode));
- printf("Data to disk ratio:\t%*.0f %%\n",
+ printf(" Data to device ratio:\t%*.0f %%\n",
width-2, K*100);
exit:
return ret;
}
-#endif
/*
* Helper to sort the device_info structure
for (i = optind; i < argc ; i++) {
int r, fd;
DIR *dirstream = NULL;
- if (more_than_one)
- printf("\n");
fd = open_file_or_dir(argv[i], &dirstream);
if (fd < 0) {
argv[1]);
return 12;
}
+ if (more_than_one)
+ printf("\n");
+
+ r = _cmd_disk_free(fd, argv[i], flags);
+ printf("\n");
r = _cmd_filesystem_usage(fd, argv[i], flags, tabular);
close_file_or_dir(fd, dirstream);