Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-04 Thread Han Cheng
On 04/03/2013 05:04 PM, Osier Yang wrote: On 01/04/13 20:00, Han Cheng wrote: + if (virAsprintf(&tmp, SCSI_DEVFS "/%s/vendor", dev->name) < 0) { + virReportOOMError(); + goto out; + } + if (virFileReadAll(tmp, 1024, &vendor) < 0) + goto out; + VIR_FREE(tmp); + tmp = NULL; + if (virAsprintf(&tmp,

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-04 Thread Han Cheng
On 04/03/2013 01:06 PM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: +int +virSCSIDeviceListAdd(virSCSIDeviceListPtr list, + virSCSIDevicePtr dev) +{ +if (virSCSIDeviceListFind(list, dev)) { +virReportError(VIR_ERR_INTERNAL_ERROR, +

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:00, Han Cheng wrote: This patch add util functions for scsi hostdev. Signed-off-by: Han Cheng --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt_private.syms | 22 +++ src/util/virscsi.c | 399 ++

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-02 Thread Han Cheng
On 04/03/2013 01:06 PM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: +struct _virSCSIDevice { +unsigned int adapter; +unsigned int bus; +unsigned int target; +unsigned int unit; + +char *name; /* adapter:bus:target:

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-02 Thread Hu Tao
On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: > This patch add util functions for scsi hostdev. > > Signed-off-by: Han Cheng > --- > po/POTFILES.in |1 + > src/Makefile.am |1 + > src/libvirt_private.syms | 22 +++ > src/util/virscsi.c | 399 > ++

[libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-01 Thread Han Cheng
This patch add util functions for scsi hostdev. Signed-off-by: Han Cheng --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt_private.syms | 22 +++ src/util/virscsi.c | 399 ++ src/util/virscsi.h | 83