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/4f8f8237563b
branches:  trunk
changeset: 379869:4f8f8237563b
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 543e8a3a0164 -r 4f8f8237563b 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 @@ format_bytes(uint64_t val, uint64_t *pdi
        *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