summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/label.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sade/label.c')
-rw-r--r--usr.sbin/sade/label.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index bce434e..460f194 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -901,8 +901,9 @@ diskLabel(Device *dev)
sprintf(osize, "%d", sz);
val = msgGetInput(osize,
- "Please specify the partition size in blocks or append a trailing M for\n"
- "megabytes or C for cylinders. %d blocks (%dMB) are free.",
+ "Please specify the partition size in blocks or append a trailing G for\n"
+ "gigabytes, M for megabytes, or C for cylinders.\n"
+ "%d blocks (%dMB) are free.",
sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0) {
clear_wins();
@@ -912,6 +913,8 @@ diskLabel(Device *dev)
if (*cp) {
if (toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (toupper(*cp) == 'G')
+ size *= ONE_GIG;
else if (toupper(*cp) == 'C')
size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
}
OpenPOWER on IntegriCloud