diff options
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 185b6d300ebc..5e2cf6f342f8 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -719,10 +719,15 @@ char *resource_string(char *buf, char *end, struct resource *res, | |||
719 | specp = &mem_spec; | 719 | specp = &mem_spec; |
720 | decode = 0; | 720 | decode = 0; |
721 | } | 721 | } |
722 | p = number(p, pend, res->start, *specp); | 722 | if (decode && res->flags & IORESOURCE_UNSET) { |
723 | if (res->start != res->end) { | 723 | p = string(p, pend, "size ", str_spec); |
724 | *p++ = '-'; | 724 | p = number(p, pend, resource_size(res), *specp); |
725 | p = number(p, pend, res->end, *specp); | 725 | } else { |
726 | p = number(p, pend, res->start, *specp); | ||
727 | if (res->start != res->end) { | ||
728 | *p++ = '-'; | ||
729 | p = number(p, pend, res->end, *specp); | ||
730 | } | ||
726 | } | 731 | } |
727 | if (decode) { | 732 | if (decode) { |
728 | if (res->flags & IORESOURCE_MEM_64) | 733 | if (res->flags & IORESOURCE_MEM_64) |