mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
nodedev: Remove @create from virNodeDeviceObjListGetParentHost
The only callers to this function are from CreateXML paths now, so let's just remove the unnecessary parameter.
This commit is contained in:
parent
5ba2ce658b
commit
8f6679d9f6
@ -545,8 +545,7 @@ virNodeDeviceObjListFindVportParentHost(virNodeDeviceObjListPtr devs)
|
||||
|
||||
int
|
||||
virNodeDeviceObjListGetParentHost(virNodeDeviceObjListPtr devs,
|
||||
virNodeDeviceDefPtr def,
|
||||
int create)
|
||||
virNodeDeviceDefPtr def)
|
||||
{
|
||||
int parent_host = -1;
|
||||
|
||||
@ -561,7 +560,7 @@ virNodeDeviceObjListGetParentHost(virNodeDeviceObjListPtr devs,
|
||||
parent_host =
|
||||
virNodeDeviceObjListGetParentHostByFabricWWN(devs, def->name,
|
||||
def->parent_fabric_wwn);
|
||||
} else if (create == CREATE_DEVICE) {
|
||||
} else {
|
||||
/* Try to find a vport capable scsi_host when no parent supplied */
|
||||
parent_host = virNodeDeviceObjListFindVportParentHost(devs);
|
||||
}
|
||||
|
@ -75,8 +75,7 @@ virNodeDeviceObjListRemove(virNodeDeviceObjListPtr devs,
|
||||
|
||||
int
|
||||
virNodeDeviceObjListGetParentHost(virNodeDeviceObjListPtr devs,
|
||||
virNodeDeviceDefPtr def,
|
||||
int create);
|
||||
virNodeDeviceDefPtr def);
|
||||
|
||||
virNodeDeviceObjListPtr
|
||||
virNodeDeviceObjListNew(void);
|
||||
|
@ -563,8 +563,7 @@ nodeDeviceCreateXML(virConnectPtr conn,
|
||||
if (virNodeDeviceGetWWNs(def, &wwnn, &wwpn) == -1)
|
||||
goto cleanup;
|
||||
|
||||
if ((parent_host = virNodeDeviceObjListGetParentHost(driver->devs, def,
|
||||
CREATE_DEVICE)) < 0)
|
||||
if ((parent_host = virNodeDeviceObjListGetParentHost(driver->devs, def)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virVHBAManageVport(parent_host, wwpn, wwnn, VPORT_CREATE) < 0)
|
||||
|
@ -5477,7 +5477,7 @@ testNodeDeviceCreateXML(virConnectPtr conn,
|
||||
/* Unlike the "real" code we don't need the parent_host in order to
|
||||
* call virVHBAManageVport, but still let's make sure the code finds
|
||||
* something valid and no one messed up the mock environment. */
|
||||
if (virNodeDeviceObjListGetParentHost(driver->devs, def, CREATE_DEVICE) < 0)
|
||||
if (virNodeDeviceObjListGetParentHost(driver->devs, def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* In the real code, we'd call virVHBAManageVport followed by
|
||||
|
Loading…
Reference in New Issue
Block a user