aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-10-06 17:33:29 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-04 11:47:15 -0500
commit2840537228fba95e05cab1a6b5719c61982db279 (patch)
tree071b70210b1ebdf2fb7ff908f57ca481357edaaa /lib
parent3368dd29586c6460b629ac5b4f6b86a6fd3dd421 (diff)
vsprintf: fix io/mem resource width
The leading "0x" consumes field width, so leave space for it in addition to the 4 or 8 hex digits. This means we'll print "0x0000-0x01df" rather than "0x00-0x1df", for example. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 33bed5e67a21..7830576018c0 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -598,11 +598,11 @@ static char *resource_string(char *buf, char *end, struct resource *res,
598 struct printf_spec spec) 598 struct printf_spec spec)
599{ 599{
600#ifndef IO_RSRC_PRINTK_SIZE 600#ifndef IO_RSRC_PRINTK_SIZE
601#define IO_RSRC_PRINTK_SIZE 4 601#define IO_RSRC_PRINTK_SIZE 6
602#endif 602#endif
603 603
604#ifndef MEM_RSRC_PRINTK_SIZE 604#ifndef MEM_RSRC_PRINTK_SIZE
605#define MEM_RSRC_PRINTK_SIZE 8 605#define MEM_RSRC_PRINTK_SIZE 10
606#endif 606#endif
607 struct printf_spec num_spec = { 607 struct printf_spec num_spec = {
608 .base = 16, 608 .base = 16,