From: Ed Swierk Date: Wed, 10 Mar 2010 18:48:49 +0000 (-0500) Subject: Allow devices without a parent X-Git-Tag: v0.8.0~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e29439bd14ef2a28bc9b15e1c17faf7a12b1afc4;p=thirdparty%2Flibvirt.git Allow devices without a parent * Allow devices without parent links to be created and set their parent to the root "computer" node --- diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index a6ca7856ce..11e27e0662 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1220,14 +1220,13 @@ static int udevSetParent(struct udev_device *device, if (parent_device == NULL) { VIR_INFO("Could not find udev parent for device with sysfs path '%s'", udev_device_get_syspath(device)); - goto out; } parent_sysfs_path = udev_device_get_syspath(parent_device); if (parent_sysfs_path == NULL) { VIR_INFO("Could not get syspath for parent of '%s'", udev_device_get_syspath(device)); - goto out; + parent_sysfs_path = ""; } def->parent_sysfs_path = strdup(parent_sysfs_path);