提交 82f240ae 编写于 作者: M Michal Privoznik

conf: s/virNetworkFindByUUID/virNetworkObjFindByUUID/

It's returning virNetworkObjPtr after all. And it matches the
pattern laid out by domain_conf.h.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 2ea3ce33
......@@ -86,8 +86,8 @@ virNetworkObjTaint(virNetworkObjPtr obj,
return true;
}
virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
const unsigned char *uuid)
virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
const unsigned char *uuid)
{
size_t i;
......@@ -4150,7 +4150,7 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr nets,
virNetworkObjPtr net = NULL;
/* See if a network with matching UUID already exists */
net = virNetworkFindByUUID(nets, def->uuid);
net = virNetworkObjFindByUUID(nets, def->uuid);
if (net) {
/* UUID matches, but if names don't match, refuse it */
if (STRNEQ(net->def->name, def->name)) {
......
......@@ -301,8 +301,8 @@ virNetworkObjIsActive(const virNetworkObj *net)
bool virNetworkObjTaint(virNetworkObjPtr obj,
virNetworkTaintFlags taint);
virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
const unsigned char *uuid);
virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
const unsigned char *uuid);
virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets,
const char *name);
......
......@@ -558,13 +558,13 @@ virNetworkDefParseString;
virNetworkDefUpdateSection;
virNetworkDeleteConfig;
virNetworkFindByName;
virNetworkFindByUUID;
virNetworkForwardTypeToString;
virNetworkIpDefNetmask;
virNetworkIpDefPrefix;
virNetworkLoadAllConfigs;
virNetworkLoadAllState;
virNetworkObjAssignDef;
virNetworkObjFindByUUID;
virNetworkObjFree;
virNetworkObjGetPersistentDef;
virNetworkObjIsDuplicate;
......
......@@ -130,7 +130,7 @@ networkObjFromNetwork(virNetworkPtr net)
char uuidstr[VIR_UUID_STRING_BUFLEN];
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
networkDriverUnlock();
if (!network) {
......@@ -2476,7 +2476,7 @@ static virNetworkPtr networkLookupByUUID(virConnectPtr conn,
virNetworkPtr ret = NULL;
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, uuid);
network = virNetworkObjFindByUUID(driver->networks, uuid);
networkDriverUnlock();
if (!network) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
......@@ -3071,7 +3071,7 @@ networkUndefine(virNetworkPtr net)
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
"%s", _("no network with matching uuid"));
......@@ -3144,7 +3144,7 @@ networkUpdate(virNetworkPtr net,
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
"%s", _("no network with matching uuid"));
......@@ -3301,7 +3301,7 @@ static int networkCreate(virNetworkPtr net)
virObjectEventPtr event = NULL;
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
......@@ -3336,7 +3336,7 @@ static int networkDestroy(virNetworkPtr net)
virObjectEventPtr event = NULL;
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
......@@ -3462,7 +3462,7 @@ static int networkSetAutostart(virNetworkPtr net,
int ret = -1;
networkDriverLock();
network = virNetworkFindByUUID(driver->networks, net->uuid);
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
......
......@@ -472,7 +472,7 @@ static virNetworkPtr parallelsNetworkLookupByUUID(virConnectPtr conn,
virNetworkPtr ret = NULL;
parallelsDriverLock(privconn);
network = virNetworkFindByUUID(privconn->networks, uuid);
network = virNetworkObjFindByUUID(privconn->networks, uuid);
parallelsDriverUnlock(privconn);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
......@@ -522,7 +522,7 @@ static char *parallelsNetworkGetXMLDesc(virNetworkPtr net,
virCheckFlags(VIR_NETWORK_XML_INACTIVE, NULL);
parallelsDriverLock(privconn);
network = virNetworkFindByUUID(privconn->networks, net->uuid);
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
parallelsDriverUnlock(privconn);
if (!network) {
......@@ -546,7 +546,7 @@ static int parallelsNetworkIsActive(virNetworkPtr net)
int ret = -1;
parallelsDriverLock(privconn);
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
parallelsDriverUnlock(privconn);
if (!obj) {
virReportError(VIR_ERR_NO_NETWORK, NULL);
......@@ -567,7 +567,7 @@ static int parallelsNetworkIsPersistent(virNetworkPtr net)
int ret = -1;
parallelsDriverLock(privconn);
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
parallelsDriverUnlock(privconn);
if (!obj) {
virReportError(VIR_ERR_NO_NETWORK, NULL);
......@@ -589,7 +589,7 @@ static int parallelsNetworkGetAutostart(virNetworkPtr net,
int ret = -1;
parallelsDriverLock(privconn);
network = virNetworkFindByUUID(privconn->networks, net->uuid);
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
parallelsDriverUnlock(privconn);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
......
......@@ -3499,7 +3499,7 @@ static virNetworkPtr testNetworkLookupByUUID(virConnectPtr conn,
virNetworkPtr ret = NULL;
testDriverLock(privconn);
net = virNetworkFindByUUID(privconn->networks, uuid);
net = virNetworkObjFindByUUID(privconn->networks, uuid);
testDriverUnlock(privconn);
if (net == NULL) {
......@@ -3654,7 +3654,7 @@ static int testNetworkIsActive(virNetworkPtr net)
int ret = -1;
testDriverLock(privconn);
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
testDriverUnlock(privconn);
if (!obj) {
virReportError(VIR_ERR_NO_NETWORK, NULL);
......@@ -3675,7 +3675,7 @@ static int testNetworkIsPersistent(virNetworkPtr net)
int ret = -1;
testDriverLock(privconn);
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
testDriverUnlock(privconn);
if (!obj) {
virReportError(VIR_ERR_NO_NETWORK, NULL);
......@@ -3812,7 +3812,7 @@ testNetworkUpdate(virNetworkPtr net,
testDriverLock(privconn);
network = virNetworkFindByUUID(privconn->networks, net->uuid);
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
if (!network) {
virReportError(VIR_ERR_NO_NETWORK,
"%s", _("no network with matching uuid"));
......
......@@ -61,7 +61,7 @@ let lockedObjMethods = [
"virDomainFindByName";
"virDomainAssignDef";
"virNetworkFindByUUID";
"virNetworkObjFindByUUID";
"virNetworkFindByName";
"virNetworkAssignDef";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册