From 7b90fff76802b1a0ec37dba4c72e49702bb44ed9 Mon Sep 17 00:00:00 2001 From: Mike Larkin Date: Wed, 23 Oct 2013 05:05:20 +0000 Subject: Allow uppercase "K/M/G" specification in "machine memory" boot command. ok guenther, dlg, deraadt --- sys/arch/amd64/stand/boot/boot.8 | 6 +++--- sys/arch/amd64/stand/libsa/cmd_i386.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'sys/arch/amd64/stand') 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 =[KMG] +.Dl =[KkMmGg] .Dl [+-]@
.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++; } -- cgit v1.2.3