commit - a6199142d1ac6e31748e06c3319d676356389c05
commit + 6efb5c5d37686d21ce93ced9d4a897e1cade3a10
blob - fa58e3398fd99b752712af1ac2c0c5f6157e8901
blob + 1694292e4ae12e68fb1f23acdb1c84080517b900
--- diskinfo.c
+++ diskinfo.c
{
struct dk_inquiry di;
struct disklabel dl;
- char sbuf[FMT_SCALED_STRSIZE];
int dev;
int i;
if (ioctl(dev, DIOCGDINFO, &dl) == -1)
err(1, "%s: ioctl(DIOCGDINFO)", __func__);
- printf("[%s %s]: ", di.vendor, di.product);
- printf("%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\n",
+ printf("%s:", devname);
+ printf("%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx",
dl.d_uid[0], dl.d_uid[1], dl.d_uid[2], dl.d_uid[3],
dl.d_uid[4], dl.d_uid[5], dl.d_uid[6], dl.d_uid[7]);
- printf("%-8s\t", devname);
+ printf(" [%s %s]", di.vendor, di.product);
- if (human) {
- if(fmt_scaled(DL_GETDSIZE(&dl) * dl.d_secsize, sbuf) == -1)
- err(1, "%s: fmt_scaled()", __func__);
- printf("%7s", sbuf);
- } else {
- /* Size in blocks */
- printf("%16llu", DL_GETDSIZE(&dl));
- }
-
for (i = 0; i < dl.d_npartitions; i++)
print_partition(devname, &dl, i, human);
printf("\n\n");
}
if (human) {
- printf("DISK \t SIZE\t FSTYPE\tMOUNT\n");
+ printf("DISK \t TOTAL\t FSTYPE\tMOUNT\n");
} else {
- printf("DISK \t SIZE\t FSTYPE\tMOUNT\n");
+ printf("DISK \t TOTAL\t FSTYPE\tMOUNT\n");
}
/* Print all of those disks*/
errx(1, "%s: strsep", __func__);
print_device(p, human);
-
-#if 0
-#endif
}
return 0;