summaryrefslogtreecommitdiff
path: root/sbin/fdisk/mbr.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2002-01-18 08:38:27 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2002-01-18 08:38:27 +0000
commit7598f41630e91a2ab9de9e4ef1f14f7f1e311e40 (patch)
treecfac9ede494d0071811937f4993f29e30d4a47ac /sbin/fdisk/mbr.c
parent3e97ac4c2b74886909fff64ecfda1d924d59d547 (diff)
Allow size values to be displayed in the user's choice of units.
Idea borrowed from disklabel. i.e. Users can now type "print M" and be rewarded with partition sizes in Megs
Diffstat (limited to 'sbin/fdisk/mbr.c')
-rw-r--r--sbin/fdisk/mbr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c
index f116c9051a4..95213315939 100644
--- a/sbin/fdisk/mbr.c
+++ b/sbin/fdisk/mbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.c,v 1.14 2002/01/04 08:35:06 kjell Exp $ */
+/* $OpenBSD: mbr.c,v 1.15 2002/01/18 08:38:26 kjell Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -130,19 +130,20 @@ MBR_make(mbr, mbr_buf)
}
void
-MBR_print(mbr)
+MBR_print(mbr, units)
mbr_t *mbr;
+ char *units;
{
int i;
/* Header */
printf("Signature: 0x%X\n",
(int)mbr->signature);
- PRT_print(0, NULL);
+ PRT_print(0, NULL, units);
/* Entries */
for (i = 0; i < NDOSPART; i++)
- PRT_print(i, &mbr->part[i]);
+ PRT_print(i, &mbr->part[i], units);
}
int
@@ -206,6 +207,6 @@ MBR_pcopy(disk, mbr)
PRT_parse(disk, &mbr_disk[MBR_PART_OFF +
MBR_PART_SIZE * i],
offset, reloff, &mbr->part[i], i);
- PRT_print(i, &mbr->part[i]);
+ PRT_print(i, &mbr->part[i], NULL);
}
}