diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index ad0f27ee4705f0128ce147171de1fa2c49237799..9d2996046fbff7d19181b6062add8d5374db7176 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -870,7 +870,7 @@ virNodeDeviceObjListExportCallback(void *payload, virNodeDeviceMatch(obj, data->flags)) { if (data->devices) { if (!(device = virGetNodeDevice(data->conn, def->name)) || - VIR_STRDUP(device->parent, def->parent) < 0) { + VIR_STRDUP(device->parentName, def->parent) < 0) { virObjectUnref(device); data->error = true; goto cleanup; diff --git a/src/datatypes.c b/src/datatypes.c index f7eef24ba891ad55ad69f173ae9e6e92fff90a92..0c3c66a9ce17672d236c43b6a9030fe2777e72e0 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -653,7 +653,7 @@ virNodeDeviceDispose(void *obj) VIR_DEBUG("release dev %p %s", dev, dev->name); VIR_FREE(dev->name); - VIR_FREE(dev->parent); + VIR_FREE(dev->parentName); virObjectUnref(dev->conn); } diff --git a/src/datatypes.h b/src/datatypes.h index 1a8ea01ba304876213a9228ad229b35627bbaa8c..66733b075c9a76f7ff5f632234b4cb4e2eee69a9 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -618,7 +618,7 @@ struct _virNodeDevice { virObject object; virConnectPtr conn; /* pointer back to the connection */ char *name; /* device name (unique on node) */ - char *parent; /* parent device name */ + char *parentName; /* parent device name */ }; /** diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c index 563ce889b91718dbd7dc0dabed491ac9ce6cf6cc..8ced3cea0e84d385194e1ef767a1f5fb6ca119fb 100644 --- a/src/libvirt-nodedev.c +++ b/src/libvirt-nodedev.c @@ -346,16 +346,16 @@ virNodeDeviceGetParent(virNodeDevicePtr dev) virCheckNodeDeviceReturn(dev, NULL); - if (!dev->parent) { + if (!dev->parentName) { if (dev->conn->nodeDeviceDriver && dev->conn->nodeDeviceDriver->nodeDeviceGetParent) { - dev->parent = dev->conn->nodeDeviceDriver->nodeDeviceGetParent(dev); + dev->parentName = dev->conn->nodeDeviceDriver->nodeDeviceGetParent(dev); } else { virReportUnsupportedError(); virDispatchError(dev->conn); return NULL; } } - return dev->parent; + return dev->parentName; } diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 61afa1f8eb490af27ec5d6c98fced8c89112cf8e..d04a31747a7179637457245c9ddd56db2eb31e08 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -256,7 +256,7 @@ nodeDeviceLookupByName(virConnectPtr conn, goto cleanup; if ((device = virGetNodeDevice(conn, name))) { - if (VIR_STRDUP(device->parent, def->parent) < 0) { + if (VIR_STRDUP(device->parentName, def->parent) < 0) { virObjectUnref(device); device = NULL; } @@ -290,7 +290,7 @@ nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, goto cleanup; if ((device = virGetNodeDevice(conn, def->name))) { - if (VIR_STRDUP(device->parent, def->parent) < 0) { + if (VIR_STRDUP(device->parentName, def->parent) < 0) { virObjectUnref(device); device = NULL; } diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 5b764bab48d5cf11adc6a5bdb23446fc254bcefc..a8a5932d713477771156e5d6fd93cf1848eaf6eb 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3805,7 +3805,7 @@ remoteDispatchNodeDeviceGetParent(virNetServerPtr server ATTRIBUTE_UNUSED, parent = virNodeDeviceGetParent(dev); if (parent == NULL) { - ret->parent = NULL; + ret->parentName = NULL; } else { /* remoteDispatchClientRequest will free this. */ char **parent_p; @@ -3815,7 +3815,7 @@ remoteDispatchNodeDeviceGetParent(virNetServerPtr server ATTRIBUTE_UNUSED, VIR_FREE(parent_p); goto cleanup; } - ret->parent = parent_p; + ret->parentName = parent_p; } rv = 0; diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 9dbd497b2fffbe516249afbe4e44a720563d5fd7..296a0871813a94e3f74cf533868af95ddb89d2b9 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -2028,7 +2028,7 @@ struct remote_node_device_get_parent_args { }; struct remote_node_device_get_parent_ret { - remote_string parent; + remote_string parentName; }; struct remote_node_device_num_of_caps_args { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index f45aba27a202a7dd064d6cc5a89b6c8f7b7de920..fe163db73f8860e97a4f7aad9660a6f7c0c79c4b 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -1541,7 +1541,7 @@ struct remote_node_device_get_parent_args { remote_nonnull_string name; }; struct remote_node_device_get_parent_ret { - remote_string parent; + remote_string parentName; }; struct remote_node_device_num_of_caps_args { remote_nonnull_string name; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index eec7a82924be8a1b83045c5a64d51a05c87c9f15..f5b5e3ee8dda6fdf13397f56d6efe38deb797b8d 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5416,7 +5416,7 @@ testNodeDeviceLookupByName(virConnectPtr conn, const char *name) def = virNodeDeviceObjGetDef(obj); if ((ret = virGetNodeDevice(conn, name))) { - if (VIR_STRDUP(ret->parent, def->parent) < 0) { + if (VIR_STRDUP(ret->parentName, def->parent) < 0) { virObjectUnref(ret); ret = NULL; } @@ -5641,8 +5641,8 @@ testNodeDeviceCreateXML(virConnectPtr conn, if (!(dev = virGetNodeDevice(conn, objdef->name))) goto cleanup; - VIR_FREE(dev->parent); - if (VIR_STRDUP(dev->parent, def->parent) < 0) + VIR_FREE(dev->parentName); + if (VIR_STRDUP(dev->parentName, def->parent) < 0) goto cleanup; ret = dev;