
Jonathon Jongsma <jjongsma@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