X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Fvsprintf.c;h=5e2cf6f342f8cac5dad0d91481c0622c36542179;hb=158e0d3621683ee0cdfeeba56f0e5ddd97ae984f;hp=185b6d300ebcedb86c0214c7007716ac868c17a1;hpb=4907cdca7210c5895311bddcf05a4c85b67d8566;p=linux-2.6-block.git 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, specp = &mem_spec; decode = 0; } - p = number(p, pend, res->start, *specp); - if (res->start != res->end) { - *p++ = '-'; - p = number(p, pend, res->end, *specp); + if (decode && res->flags & IORESOURCE_UNSET) { + p = string(p, pend, "size ", str_spec); + p = number(p, pend, resource_size(res), *specp); + } else { + p = number(p, pend, res->start, *specp); + if (res->start != res->end) { + *p++ = '-'; + p = number(p, pend, res->end, *specp); + } } if (decode) { if (res->flags & IORESOURCE_MEM_64)