mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
nodedev: prevent internal error on dev_busid parse
As "none" is a legal value represented in the sysfs attribute dev_busid this patch prevents libvirt from incorrectly reporting an internal error. Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Suggested-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
a46ff97762
commit
e37c39747b
@ -1140,7 +1140,7 @@ udevProcessCSS(struct udev_device *device,
|
||||
/* process optional channel devices information */
|
||||
udevGetStringSysfsAttr(device, "dev_busid", &dev_busid);
|
||||
|
||||
if (dev_busid != NULL)
|
||||
if (dev_busid != NULL && STRNEQ(dev_busid, "none"))
|
||||
def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid);
|
||||
|
||||
if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user