Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot When printing memory size, don't promote t...



details:   https://anonhg.NetBSD.org/src/rev/c6520464e6b3
branches:  trunk
changeset: 1021900:c6520464e6b3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Jun 23 21:43:38 2021 +0000

description:
When printing memory size, don't promote to next unit size unless it is at
two digits.

diffstat:

 sys/stand/efiboot/boot.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9bed99155bb8 -r c6520464e6b3 sys/stand/efiboot/boot.c
--- a/sys/stand/efiboot/boot.c  Wed Jun 23 21:42:43 2021 +0000
+++ b/sys/stand/efiboot/boot.c  Wed Jun 23 21:43:38 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.33 2021/06/23 00:38:12 jmcneill Exp $       */
+/*     $NetBSD: boot.c,v 1.34 2021/06/23 21:43:38 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -479,7 +479,7 @@
        *punit = "bytes";
        *pdiv = 1;
 
-       for (n = 0; n < __arraycount(units) && val >= 1024; n++) {
+       for (n = 0; n < __arraycount(units) && val >= 1024 * 10; n++) {
                *punit = units[n];
                *pdiv *= 1024;
                val /= 1024;



Home | Main Index | Thread Index | Old Index