[libvirt] [PATCH 1/4] virsh-domain: use correct base for virStrToLong_ui

Laine Stump laine at laine.org
Mon Oct 26 13:48:20 UTC 2015


On 10/26/2015 05:53 AM, Pavel Hrdina wrote:
> The current situation is not ideal, it's not documented anywhere and for users
> you can only try the command and see what happens.  Yes, it can and probably
> will break some scripts for some users, but I think we should make it somehow
> consistent and document it properly how to format it.
>
> The output of nodedev-dumpxml should be definitely fixed to print the PCI
> address using only hex numbers.
>
> For the parsing part, this code is currently used only for 'attach-disk' and
> the 'attach-interface' will be a new functionality and we can easily restrict
> the format of PCI address to be provided only in hex numbers with '0x' prefix.

/me wakes up Monday morning, reads this paragraph, and realizes that he 
should have looked at the entire patch before commenting :-/

Yeah, forget everything I said. I hadn't scrolled all the way to the 
bottom of the patch, but just assumed from the commit message that it 
was going to fix the base at 16 for the XML parser too. Pretty stupid of 
me - sorry for all the noise over nothing.

Definitely any time someone is writing a unified PCI address 
(DDDD:BB:SS.F) I think we can safely assume/require they are using hex. 
Really, I'm surprised this didn't trip anyone up before now.

ACK.




More information about the libvir-list mailing list