break;
}
+ case VIR_NODE_DEV_CAP_AP_MATRIX:
+ addr = g_strdup(caps->data.ap_matrix.addr);
+ break;
+
case VIR_NODE_DEV_CAP_SYSTEM:
case VIR_NODE_DEV_CAP_USB_DEV:
case VIR_NODE_DEV_CAP_USB_INTERFACE:
case VIR_NODE_DEV_CAP_VDPA:
case VIR_NODE_DEV_CAP_AP_CARD:
case VIR_NODE_DEV_CAP_AP_QUEUE:
- case VIR_NODE_DEV_CAP_AP_MATRIX:
case VIR_NODE_DEV_CAP_LAST:
break;
}
static int
-udevProcessAPMatrix(virNodeDeviceDefPtr def)
+udevProcessAPMatrix(struct udev_device *device,
+ virNodeDeviceDefPtr def)
{
/* Both udev_device_get_sysname and udev_device_get_subsystem return
* "matrix" for an AP matrix device, so in order to prevent confusion in
* naming, let's fallback to hardcoding the name.
*/
+ virNodeDevCapDataPtr data = &def->caps->data;
+
+ data->ap_matrix.addr = g_strdup(udev_device_get_sysname(device));
def->name = g_strdup("ap_matrix");
return 0;
case VIR_NODE_DEV_CAP_AP_QUEUE:
return udevProcessAPQueue(device, def);
case VIR_NODE_DEV_CAP_AP_MATRIX:
- return udevProcessAPMatrix(def);
+ return udevProcessAPMatrix(device, def);
case VIR_NODE_DEV_CAP_MDEV_TYPES:
case VIR_NODE_DEV_CAP_SYSTEM:
case VIR_NODE_DEV_CAP_FC_HOST: