On 22.02.2013 17:55, Philipp Hahn wrote: > uid_t and gid_t are opaque types, ranging from s32 to u32 to u64. > > Unfortunately libvirt uses the value -1 to mean "current process", which > on Linux32 gets converted to ALLONE := +(2^32-1) = 4294967295. > > Different libvirt versions used different formatting in the past, which > break one or the other parsing function: > virXPathLong(): (signed long)-1 != (double)ALLONE > virXPathULong(): (unsigned long)-1 != (double)-1 > > Roll our own version of virXPathULong(), which also accepts -1, which is > silently converted to ALLONE. > > For output: do the reverse and print -1 instead of ALLONE. > > Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx> > --- > src/conf/storage_conf.c | 74 ++++++++++++++++++++++++++++++++++++++--------- > 1 file changed, 60 insertions(+), 14 deletions(-) > This one breaks storagevolxml2xmltest: TEST: storagevolxml2xmltest 1) Storage Vol XML-2-XML vol-file ... OK 2) Storage Vol XML-2-XML vol-file-backing ... OK 3) Storage Vol XML-2-XML vol-qcow2 ... OK 4) Storage Vol XML-2-XML vol-partition ... OK 5) Storage Vol XML-2-XML vol-logical ... OK 6) Storage Vol XML-2-XML vol-logical-backing ... OK 7) Storage Vol XML-2-XML vol-sheepdog ... Offset 283 Expect [4294967295</owner> <group>4294967295] Actual [-1</owner> <group>-1] ... FAILED However, the first 3 patches are correct. Even though it's freeze, they are pure bugfixes so I've pushed them. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list