[PATCH libvirt v2 01/11] nodedev: detect AP card device

Bjoern Walk bwalk at linux.ibm.com
Mon Nov 16 07:16:10 UTC 2020


Jonathon Jongsma <jjongsma at redhat.com> [2020-11-13, 09:28AM -0600]:
> That said, I don't believe that your parsing code actually supports an
> optional '0x' prefix. In virNodeDevCapAPCardParseXML(), you call
> 
>     virStrToLong_uip(adapter, NULL, 0, &ap_card->ap_adapter)
> 
> But I'm quite sure that passing a value of e.g. 'ff' for adapter will
> result in a parsing failure. Try changing the ap-adapter value in
> tests/nodedevschemadata/ap_card07.xml to some different values and see
> what happens.

As it should, because 'ff' is not a valid hex value in libvirt context.
Maybe this changed for for the newer types. I can remember a long
discussion couple of years ago about this disambiguity and if we should
require the '0x'-prefix and make the base for the conversion explicit,
but this was rejected.

> 
> Jonathon
> 

-- 
IBM Systems
Linux on Z & Virtualization Development
--------------------------------------------------
IBM Deutschland Research & Development GmbH
Schönaicher Str. 220, 71032 Böblingen
Phone: +49 7031 16 1819
--------------------------------------------------
Vorsitzende des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201116/f7b0551d/attachment-0001.sig>


More information about the libvir-list mailing list