Module Name: src Committed By: jmcneill Date: Wed Jun 23 21:43:38 UTC 2021
Modified Files: src/sys/stand/efiboot: boot.c Log Message: When printing memory size, don't promote to next unit size unless it is at two digits. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/stand/efiboot/boot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.33 src/sys/stand/efiboot/boot.c:1.34 --- src/sys/stand/efiboot/boot.c:1.33 Wed Jun 23 00:38:12 2021 +++ src/sys/stand/efiboot/boot.c Wed Jun 23 21:43:38 2021 @@ -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 <non...@netbsd.org> @@ -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;