* Set return value in error cases
* Clarify error message when parent device is not vport capable
parent = virNodeDeviceFindByName(devs, parent_name);
if (parent == NULL) {
virNodeDeviceReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not find parent HBA for '%s'"),
+ _("Could not find parent device for '%s'"),
dev_name);
ret = -1;
goto out;
if (cap == NULL) {
virNodeDeviceReportError(VIR_ERR_INTERNAL_ERROR,
- _("Parent HBA %s is not capable "
+ _("Parent device %s is not capable "
"of vport operations"),
parent->def->name);
ret = -1;
static int
nodeDeviceDestroy(virNodeDevicePtr dev)
{
- int ret = 0;
+ int ret = -1;
virDeviceMonitorStatePtr driver = dev->conn->devMonPrivateData;
virNodeDeviceObjPtr obj = NULL;
char *parent_name = NULL, *wwnn = NULL, *wwpn = NULL;
goto out;
}
+ ret = 0;
out:
if (obj)
virNodeDeviceObjUnlock(obj);