On Mon, Sep 14, 2020 at 09:11:46PM +0200, Boris Fiuczynski wrote: > Make Direct Access Storage Devices (DASDs) available in the node_device driver. > > Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx> > Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> > Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx> > --- > src/node_device/node_device_udev.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c > index 38906f5f96..023377fc01 100644 > --- a/src/node_device/node_device_udev.c > +++ b/src/node_device/node_device_udev.c > @@ -871,6 +871,19 @@ udevProcessSD(struct udev_device *device, > } > > > +static int > +udevProcessDASD(struct udev_device *device, > + virNodeDeviceDefPtr def) > +{ > + virNodeDevCapStoragePtr storage = &def->caps->data.storage; > + > + if (udevGetStringSysfsAttr(device, "device/uid", &storage->serial) < 0) > + return -1; > + > + return udevProcessDisk(device, def); > +} > + > + > /* This function exists to deal with the case in which a driver does > * not provide a device type in the usual place, but udev told us it's > * a storage device, and we can make a good guess at what kind of > @@ -891,6 +904,18 @@ udevKludgeStorageType(virNodeDeviceDefPtr def) > def->sysfs_path); > return 0; > } > + /* For Direct Access Storage Devices (DASDs) there are > + * currently no identifies in udev besides ID_PATH. Since s/identifies/identifiers/ Erik