[PATCH 03/15] vbox: Drop @iid from UIMachine::LaunchVMProcess()

Michal Privoznik mprivozn at redhat.com
Mon Jan 23 09:34:12 UTC 2023


The @iid argument of UIMachine::LaunchVMProcess() callback is
unused. Drop it and also its propagation from parent functions.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/vbox/vbox_common.c        | 6 +++---
 src/vbox/vbox_tmpl.c          | 1 -
 src/vbox/vbox_uniformed_api.h | 1 -
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index ea3a54b7c9..7b1b8bb1b0 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -2046,7 +2046,7 @@ static int vboxDomainUndefine(virDomainPtr dom)
 }
 
 static int
-vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIID *iid)
+vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine)
 {
     struct _vboxDriver *data = dom->conn->privateData;
     int vrdpPresent = 0;
@@ -2147,7 +2147,7 @@ vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIID *iid
     if (vrdpPresent)
         VBOX_UTF8_TO_UTF16("vrdp", &sessionType);
 
-    rc = gVBoxAPI.UIMachine.LaunchVMProcess(data, machine, iid,
+    rc = gVBoxAPI.UIMachine.LaunchVMProcess(data, machine,
                                             sessionType, env,
                                             &progress);
 
@@ -2238,7 +2238,7 @@ static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
                 gVBoxAPI.UIMachine.GetState(machine, &state);
 
                 if (gVBoxAPI.machineStateChecker.NotStart(state)) {
-                    ret = vboxStartMachine(dom, i, machine, &iid);
+                    ret = vboxStartMachine(dom, i, machine);
                 } else {
                     virReportError(VIR_ERR_OPERATION_FAILED, "%s",
                                    _("machine is not in "
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 967e44fea4..57d581e49c 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -746,7 +746,6 @@ _machineRemoveSharedFolder(IMachine *machine, PRUnichar *name)
 static nsresult
 _machineLaunchVMProcess(struct _vboxDriver *data,
                         IMachine *machine,
-                        vboxIID *iid G_GNUC_UNUSED,
                         PRUnichar *sessionType, PRUnichar *env,
                         IProgress **progress)
 {
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 18f352d98e..393e48827f 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -182,7 +182,6 @@ typedef struct {
                                    PRBool automount);
     nsresult (*RemoveSharedFolder)(IMachine *machine, PRUnichar *name);
     nsresult (*LaunchVMProcess)(struct _vboxDriver *driver, IMachine *machine,
-                                vboxIID *iid,
                                 PRUnichar *sessionType, PRUnichar *env,
                                 IProgress **progress);
     nsresult (*Unregister)(IMachine *machine, PRUint32 cleanupMode,
-- 
2.39.1



More information about the libvir-list mailing list