[libvirt] PATCH: REmove bogus call to virStateInit in openvz driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some unknown reason there is a call to virStateInitialize() in the 
openvz driver's open method. This is absolutely forbidden - this API is
only intended for use by the daemon. This patch removes this bogus call
and makes it call the openvz setup APIs directly.

Daniel

diff -r c2e95cd51bc3 src/openvz_driver.c
--- a/src/openvz_driver.c	Wed Aug 13 12:50:55 2008 +0000
+++ b/src/openvz_driver.c	Tue Aug 19 12:11:37 2008 +0100
@@ -81,10 +81,6 @@ static int openvzNumDomains(virConnectPt
 static int openvzNumDomains(virConnectPtr conn);
 static int openvzListDefinedDomains(virConnectPtr conn, char **const names, int nnames);
 static int openvzNumDefinedDomains(virConnectPtr conn);
-static int openvzStartup(void);
-static int openvzShutdown(void);
-static int openvzReload(void);
-static int openvzActive(void);
 
 static virDomainPtr openvzDomainDefineXML(virConnectPtr conn, const char *xml);
 static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
@@ -697,7 +693,8 @@ static virDrvOpenStatus openvzOpen(virCo
 
    conn->privateData = &ovz_driver;
 
-   virStateInitialize();
+   openvzAssignUUIDs();
+
    vms = openvzGetVPSInfo(conn);
    ovz_driver.vms = vms;
 
@@ -849,27 +846,6 @@ Version: 2.2
 
 static int openvzNumDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED) {
     return ovz_driver.num_inactive;
-}
-
-static int openvzStartup(void) {
-    openvzAssignUUIDs();
-
-    return 0;
-}
-
-static int openvzShutdown(void) {
-
-    return 0;
-}
-
-static int openvzReload(void) {
-
-    return 0;
-}
-
-static int openvzActive(void) {
-
-    return 1;
 }
 
 static virDriver openvzDriver = {
@@ -934,17 +910,8 @@ static virDriver openvzDriver = {
     NULL, /* nodeGetFreeMemory */
 };
 
-static virStateDriver openvzStateDriver = {
-    openvzStartup,
-    openvzShutdown,
-    openvzReload,
-    openvzActive,
-    NULL, /* sigHandler */
-};
-
 int openvzRegister(void) {
     virRegisterDriver(&openvzDriver);
-    virRegisterStateDriver(&openvzStateDriver);
     return 0;
 }
 

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]