提交 8f6679d9 编写于 作者: J John Ferlan

nodedev: Remove @create from virNodeDeviceObjListGetParentHost

The only callers to this function are from CreateXML paths now, so
let's just remove the unnecessary parameter.
上级 5ba2ce65
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册