summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/label.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2000-02-29 10:40:59 +0000
committerjkh <jkh@FreeBSD.org>2000-02-29 10:40:59 +0000
commit8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a (patch)
tree86307e06f2ef1119a459d79e6433486546aa6a95 /usr.sbin/sysinstall/label.c
parent35e15b09be3df921694ae02d3105e751fa8fa411 (diff)
downloadFreeBSD-src-8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a.zip
FreeBSD-src-8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a.tar.gz
o Add support for loading the rsaref or rsaintl packages, depending
on locale. o Allow use of "G" in label editor to stand for gigabytes. This is actually an unrelated patch which I meant to commit separately but what the heck, it's late. Partially submitted by: phk
Diffstat (limited to 'usr.sbin/sysinstall/label.c')
-rw-r--r--usr.sbin/sysinstall/label.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index bce434e..460f194 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/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