summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2013-10-23 05:05:20 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2013-10-23 05:05:20 +0000
commit7b90fff76802b1a0ec37dba4c72e49702bb44ed9 (patch)
treed248bc8f1bf7bdb7a0186d140755296230497d84 /sys/arch/amd64/stand
parentbba63190d1bd9fdcbf343dd0b073ffa3847c7a78 (diff)
Allow uppercase "K/M/G" specification in "machine memory" boot command.
ok guenther, dlg, deraadt
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r--sys/arch/amd64/stand/boot/boot.86
-rw-r--r--sys/arch/amd64/stand/libsa/cmd_i386.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/amd64/stand/boot/boot.8 b/sys/arch/amd64/stand/boot/boot.8
index ba5a3e0a972..c3ce6cf6b98 100644
--- a/sys/arch/amd64/stand/boot/boot.8
+++ b/sys/arch/amd64/stand/boot/boot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot.8,v 1.18 2012/09/27 12:26:28 jmc Exp $
+.\" $OpenBSD: boot.8,v 1.19 2013/10/23 05:05:19 mlarkin Exp $
.\"
.\" Copyright (c) 1997-2001 Michael Shalayeff
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: September 27 2012 $
+.Dd $Mdocdate: October 23 2013 $
.Dt BOOT 8 amd64
.Os
.Sh NAME
@@ -211,7 +211,7 @@ Otherwise the arguments specify how to modify the
memory configuration.
They take the form of:
.Pp
-.Dl =<size>[KMG]
+.Dl =<size>[KkMmGg]
.Dl [+-]<size>@<address>
.Pp
Meaning to add(+), exempt(-) or limit(=) the amount of memory specified by
diff --git a/sys/arch/amd64/stand/libsa/cmd_i386.c b/sys/arch/amd64/stand/libsa/cmd_i386.c
index 7fbdca1b0fa..1bb514bc2cb 100644
--- a/sys/arch/amd64/stand/libsa/cmd_i386.c
+++ b/sys/arch/amd64/stand/libsa/cmd_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd_i386.c,v 1.5 2012/10/30 14:06:29 jsing Exp $ */
+/* $OpenBSD: cmd_i386.c,v 1.6 2013/10/23 05:05:19 mlarkin Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -159,10 +159,13 @@ Xmemory(void)
/* Size the size */
switch (*p) {
case 'G':
+ case 'g':
size *= 1024;
case 'M':
+ case 'm':
size *= 1024;
case 'K':
+ case 'k':
size *= 1024;
p++;
}