[libvirt] [PATCH v3 05/16] interface: Use virObjectLookupKeys

John Ferlan jferlan at redhat.com
Thu Jun 22 14:02:35 UTC 2017


Use the virObjectLookupKeys rather than virObjectLockable.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/conf/virinterfaceobj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c
index 106f232..243ff33 100644
--- a/src/conf/virinterfaceobj.c
+++ b/src/conf/virinterfaceobj.c
@@ -33,7 +33,7 @@
 VIR_LOG_INIT("conf.virinterfaceobj");
 
 struct _virInterfaceObj {
-    virObjectLockable parent;
+    virObjectLookupKeys parent;
 
     bool active;           /* true if interface is active (up) */
     virInterfaceDefPtr def; /* The interface definition */
@@ -52,7 +52,7 @@ static void virInterfaceObjDispose(void *obj);
 static int
 virInterfaceObjOnceInit(void)
 {
-    if (!(virInterfaceObjClass = virClassNew(virClassForObjectLockable(),
+    if (!(virInterfaceObjClass = virClassNew(virClassForObjectLookupKeys(),
                                              "virInterfaceObj",
                                              sizeof(virInterfaceObj),
                                              virInterfaceObjDispose)))
@@ -81,7 +81,7 @@ virInterfaceObjNew(virInterfaceDefPtr def)
     if (virInterfaceObjInitialize() < 0)
         return NULL;
 
-    if (!(obj = virObjectLockableNew(virInterfaceObjClass)))
+    if (!(obj = virObjectLookupKeysNew(virInterfaceObjClass, NULL, def->name)))
         return NULL;
 
     virObjectLock(obj);
-- 
2.9.4




More information about the libvir-list mailing list