Re: [libvirt] [PATCH 5/6] nodedev: Support SCSI_GENERIC cap flag for listAllNodeDevices

2013-06-06 Thread John Ferlan
On 06/03/2013 06:05 AM, Osier Yang wrote:
 ---
  include/libvirt/libvirt.h.in | 1 +
  src/conf/node_device_conf.c  | 4 +++-
  src/conf/node_device_conf.h  | 3 ++-
  3 files changed, 6 insertions(+), 2 deletions(-)
 

ACK

Seems reasonable - although the last time you updated
virConnectListAllNodeDeviceFlags you also changed libvirt.c to add
VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST and
VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to the documented list of flags
in virConnectListAllNodeDevices().  I would think you'd need to add
VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC too.


I used cscope search on VIR_CONNECT_LIST_NODE_DEVICES_CAP in order to
find that.


John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 5/6] nodedev: Support SCSI_GENERIC cap flag for listAllNodeDevices

2013-06-06 Thread Osier Yang

On 07/06/13 04:40, John Ferlan wrote:

On 06/03/2013 06:05 AM, Osier Yang wrote:

---
  include/libvirt/libvirt.h.in | 1 +
  src/conf/node_device_conf.c  | 4 +++-
  src/conf/node_device_conf.h  | 3 ++-
  3 files changed, 6 insertions(+), 2 deletions(-)


ACK

Seems reasonable - although the last time you updated
virConnectListAllNodeDeviceFlags you also changed libvirt.c to add
VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST and
VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to the documented list of flags
in virConnectListAllNodeDevices().  I would think you'd need to add
VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC too.



Thanks for finding it out, will add .

Osier

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 5/6] nodedev: Support SCSI_GENERIC cap flag for listAllNodeDevices

2013-06-03 Thread Osier Yang
---
 include/libvirt/libvirt.h.in | 1 +
 src/conf/node_device_conf.c  | 4 +++-
 src/conf/node_device_conf.h  | 3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 1804c93..e7e003c 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -3258,6 +3258,7 @@ typedef enum {
 VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE   = 1  8,  /* Storage 
device */
 VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST   = 1  9,  /* FC Host Bus 
Adapter */
 VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS= 1  10, /* Capable of 
vport */
+VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC  = 1  11, /* Capable of 
scsi_generic */
 } virConnectListAllNodeDeviceFlags;
 
 int virConnectListAllNodeDevices (virConnectPtr conn,
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index a0b6338..b764cb8 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1492,7 +1492,9 @@ virNodeDeviceMatch(virNodeDeviceObjPtr devobj,
   (MATCH(VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST) 
virNodeDeviceCapMatch(devobj, VIR_NODE_DEV_CAP_FC_HOST))   
||
   (MATCH(VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS) 
-   virNodeDeviceCapMatch(devobj, VIR_NODE_DEV_CAP_VPORTS
+   virNodeDeviceCapMatch(devobj, VIR_NODE_DEV_CAP_VPORTS))
||
+  (MATCH(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC) 
+   virNodeDeviceCapMatch(devobj, VIR_NODE_DEV_CAP_SCSI_GENERIC
 return false;
 }
 
diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h
index e326e82..17240be 100644
--- a/src/conf/node_device_conf.h
+++ b/src/conf/node_device_conf.h
@@ -274,7 +274,8 @@ void virNodeDeviceObjUnlock(virNodeDeviceObjPtr obj);
  VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI  | \
  VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE   | \
  VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST   | \
- VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS)
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS| \
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC)
 
 int virNodeDeviceList(virConnectPtr conn,
   virNodeDeviceObjList devobjs,
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list