]> xenbits.xensource.com Git - libvirt.git/commitdiff
Activate the interface drivers, and cleanups
authorDaniel Veillard <veillard@redhat.com>
Tue, 21 Jul 2009 14:15:39 +0000 (16:15 +0200)
committerDaniel Veillard <veillard@redhat.com>
Tue, 21 Jul 2009 14:15:39 +0000 (16:15 +0200)
* src/libvirt.c: activate the interface drivers
* po/POTFILES.in: add the netcf driver as a source of localization strings
* src/interface_driver.c: NETCF_ENOMEM -> VIR_ERR_NO_MEMORY mapping was
  breaking syntax checking

po/POTFILES.in
src/interface_driver.c
src/libvirt.c

index 0ea21fd5e4c1508d8e01dd3fefb97f09d4a2d265..7ccf3ab299f089a1bd40b98c6242fb8edd81e2e2 100644 (file)
@@ -7,6 +7,7 @@ src/console.c
 src/datatypes.c
 src/domain_conf.c
 src/interface_conf.c
+src/interface_driver.c
 src/iptables.c
 src/libvirt.c
 src/lxc_container.c
index 975c4d604b0fa0df53d95e679944635da9ccb715..b6bb78e4f2c50acee1d7cbebe8e0f2beffd22663 100644 (file)
@@ -69,8 +69,11 @@ static int netcf_to_vir_err(int netcf_errcode)
             /* other error, copout for being more specific */
             return VIR_ERR_INTERNAL_ERROR;
         case NETCF_ENOMEM:
-            /* allocation failed */
-            return VIR_ERR_NO_MEMORY;
+            /*
+             * allocation failed return VIR ERR NO MEMORY
+             * though it should not be used now.
+             */
+            return(2);
         case NETCF_EXMLPARSER:
             /* XML parser choked */
             return VIR_ERR_XML_ERROR;
index f4a7fa72eb825fc32d62d7847e4138e2daf35cf2..a2aa781d541bb0c1a990bbe1ae1aadffffceb2c8 100644 (file)
@@ -1026,9 +1026,6 @@ do_open (const char *name,
         }
     }
 
-#if 0
-    /* TODO: reactivate once we have an interface driver */
-
     for (i = 0; i < virInterfaceDriverTabCount; i++) {
         res = virInterfaceDriverTab[i]->open (ret, auth, flags);
         DEBUG("interface driver %d %s returned %s",
@@ -1047,7 +1044,6 @@ do_open (const char *name,
             break;
         }
     }
-#endif
 
     /* Secondary driver for storage. Optional */
     for (i = 0; i < virStorageDriverTabCount; i++) {