Re: [libvirt] [PATCH v2 RESEND 07/12] conf: Introduce parser, formatter for uid and fid

2018-07-26 Thread Yi Min Zhao
在 2018/7/26 下午4:21, Andrea Bolognani 写道: On Thu, 2018-07-26 at 15:15 +0800, Yi Min Zhao wrote: 在 2018/7/24 下午10:25, Andrea Bolognani 写道: [...] +static int +virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci) +{ +if (!zpci->uid_assigned) +return 1; + +if (zpci->zpci_uid

Re: [libvirt] [PATCH v2 RESEND 07/12] conf: Introduce parser, formatter for uid and fid

2018-07-26 Thread Andrea Bolognani
On Thu, 2018-07-26 at 15:15 +0800, Yi Min Zhao wrote: > 在 2018/7/24 下午10:25, Andrea Bolognani 写道: > > [...] > > > +static int > > > +virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci) > > > +{ > > > +if (!zpci->uid_assigned) > > > +return 1; > > > + > > > +if (zpci->zpci_uid

Re: [libvirt] [PATCH v2 RESEND 07/12] conf: Introduce parser, formatter for uid and fid

2018-07-26 Thread Yi Min Zhao
在 2018/7/24 下午10:25, Andrea Bolognani 写道: On Tue, 2018-07-10 at 16:02 +0800, Yi Min Zhao wrote: + + + +(0x)?[0-9a-fA-F]{1,8} + + This should probably be unignedInt instead of int, but other uint* types defined in the file also use int so if anything changing al

Re: [libvirt] [PATCH v2 RESEND 07/12] conf: Introduce parser, formatter for uid and fid

2018-07-24 Thread Andrea Bolognani
On Tue, 2018-07-10 at 16:02 +0800, Yi Min Zhao wrote: > + > + > + > +(0x)?[0-9a-fA-F]{1,8} > + > + This should probably be unignedInt instead of int, but other uint* types defined in the file also use int so if anything changing all of them would be the job for a fo

[libvirt] [PATCH v2 RESEND 07/12] conf: Introduce parser, formatter for uid and fid

2018-07-10 Thread Yi Min Zhao
This patch introduces new XML parser/formatter functions. Uid is 16-bit and non-zero. Fid is 32-bit. They are added as two new attributes of PCI address, and parsed/formatted along with PCI address parser/formatter. The related test is also added. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiu