mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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:
parent
e9c23d906f
commit
69d8a327f1
@ -958,6 +958,9 @@ udevProcessDASD(struct udev_device *device,
|
||||
|
||||
udevGetStringSysfsAttr(device, "device/uid", &storage->serial);
|
||||
|
||||
if (!storage->serial)
|
||||
return -1;
|
||||
|
||||
return udevProcessDisk(device, def);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user