Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Stopgap fix for in-kernel compilation (differenc...
details: https://anonhg.NetBSD.org/src/rev/704b58e9e1e0
branches: trunk
changeset: 348632:704b58e9e1e0
user: martin <martin%NetBSD.org@localhost>
date: Mon Oct 31 09:13:20 2016 +0000
description:
Stopgap fix for in-kernel compilation (differences between humanize_number(3)
and humanize_number(9)), ok: msaitoh
diffstat:
sys/dev/pci/pci_subr.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r bec65f0c2b1b -r 704b58e9e1e0 sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c Mon Oct 31 07:37:10 2016 +0000
+++ b/sys/dev/pci/pci_subr.c Mon Oct 31 09:13:20 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.153 2016/10/31 05:10:45 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.154 2016/10/31 09:13:20 martin Exp $ */
/*
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.153 2016/10/31 05:10:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.154 2016/10/31 09:13:20 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -3056,7 +3056,11 @@
if ((cap & (1 << i)) != 0) {
humanize_number(pbuf, MEM_PBUFSIZE,
(int64_t)1024 * 1024 << (i - 4), "B",
+#ifdef _KERNEL
+ 1);
+#else
HN_AUTOSCALE, HN_NOSPACE);
+#endif
printf(" %s", pbuf);
}
}
@@ -3069,7 +3073,12 @@
humanize_number(pbuf, MEM_PBUFSIZE,
(int64_t)1024 * 1024
<< __SHIFTOUT(ctl, PCI_RESIZBAR_CTL_BARSIZ),
- "B", HN_AUTOSCALE, HN_NOSPACE);
+ "B",
+#ifdef _KERNEL
+ 1);
+#else
+ HN_AUTOSCALE, HN_NOSPACE);
+#endif
printf(" BAR Size: %s\n", pbuf);
}
}
Home |
Main Index |
Thread Index |
Old Index