Re: pciutils: 64-bit BAR addresses not shown with linux-proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> If I use the lspci linux-proc access method (-A linux-proc)
> only 32-bits of the memory BAR physical address is displayed,
> with the truncation occurring on the right.  Example:
> 
> ...
> Memory at e0030000 (64-bit, non-prefetchable) ?disabledŮ
> ...
> 
> This should be shown as:
> 
> ...
> Memory at 0000000e00300000 (64-bit, non-prefetchable) ?disabledŮ
> ...

This smells of a bug in your libc. If the format string "%08x" is used on
an integer that does not fit in 8 digits, the output definitely should not
be truncated.

As printf(3) says:

| The field width
| 
| An optional decimal digit string (with non-zero first digit) specifying
| a minimum field width.  If the converted value has fewer characters than the
| field width, it will be padded with spaces on the left (or right, if the
| left-adjustment flag has been given).  Instead of a decimal digit string one
| may write `*' or `*m$' (for some decimal integer m) to specify that the field
| width is given in the next argument, or in the m-th argument, respectively,
| which must be of type int.  A negative  field  width  is taken  as  a `-' flag
| followed by a positive field width.  In no case does a non-existent or small
| field width cause truncation of a field; if the result of a conversion is
| wider than the field width, the field is expanded to contain the conversion
| result.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@xxxxxx>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Diplomacy is an art of saying "nice doggy" until you can find a rock.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux