diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 574b970ef7aafb6ec71cc074ee3f3f3926f91c59..211e96b15a1205ec7a6e4a28e3d59575b4209a4b 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -3259,6 +3259,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 92fa18c57039271f8d1722ea7c6a231d4468a203..548cd8f79af1c2582781b1729cb15dd1cd604c26 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1496,7 +1496,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 e326e8265b31683ac3033523fd4b83669959ebb6..17240befd8fe248cb66122d260dc2919b72de2fe 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, diff --git a/src/libvirt.c b/src/libvirt.c index 620dbdde9a5832cc526448afe876817369edf793..8eb714128fecbcdf7e6ed3dbf3ff037be88f1a2f 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -14294,6 +14294,7 @@ error: * 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_SCSI_GENERIC * * Returns the number of node devices found or -1 and sets @devices to NULL in * case of error. On success, the array stored into @devices is guaranteed to