]> xenbits.xensource.com Git - libvirt.git/commitdiff
bhyve: Move autostarting of domains into bhyveStateInitialize
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 1 Mar 2019 14:01:13 +0000 (15:01 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 6 Mar 2019 09:20:31 +0000 (10:20 +0100)
The stateAutoStart callback will go away shortly. Therefore, move
the autostart call into state initialize callback.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/bhyve/bhyve_driver.c

index 3e192284cc2c2af6e4553fa9a505e5d0eced6459..061888ab0b26c2d22cd85d988470e578353b25ce 100644 (file)
@@ -1269,6 +1269,8 @@ bhyveStateInitialize(bool privileged,
 
     virBhyveProcessReconnectAll(bhyve_driver);
 
+    bhyveAutostartDomains(bhyve_driver);
+
     return 0;
 
  cleanup:
@@ -1296,15 +1298,6 @@ bhyveDriverGetGrubCaps(virConnectPtr conn)
     return 0;
 }
 
-static void
-bhyveStateAutoStart(void)
-{
-    if (!bhyve_driver)
-        return;
-
-    bhyveAutostartDomains(bhyve_driver);
-}
-
 static int
 bhyveConnectGetMaxVcpus(virConnectPtr conn,
                         const char *type)
@@ -1712,7 +1705,6 @@ static virConnectDriver bhyveConnectDriver = {
 static virStateDriver bhyveStateDriver = {
     .name = "bhyve",
     .stateInitialize = bhyveStateInitialize,
-    .stateAutoStart = bhyveStateAutoStart,
     .stateCleanup = bhyveStateCleanup,
 };