nodedev: prevent invalid DASD node object creation

Prevent the creation of a new DASD node object when the device does not
exist.

Resolves: https://issues.redhat.com/browse/RHEL-39497
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Boris Fiuczynski 2024-06-19 14:29:16 +02:00 committed by Michal Privoznik
parent e9c23d906f
commit 69d8a327f1

View File

@ -958,6 +958,9 @@ udevProcessDASD(struct udev_device *device,
udevGetStringSysfsAttr(device, "device/uid", &storage->serial);
if (!storage->serial)
return -1;
return udevProcessDisk(device, def);
}