]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox: Drop @iid from UISession::OpenExisting()
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 22 Jan 2023 11:49:29 +0000 (12:49 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Jan 2023 09:23:55 +0000 (10:23 +0100)
The @iid argument of UISession::OpenExisting() callback is
unused. Drop it and also its propagation from parent functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/vbox/vbox_common.c
src/vbox/vbox_tmpl.c
src/vbox/vbox_uniformed_api.h

index a62714e78293aa232b30645d30e47411db318132..c769a517a9cc8d4af55f3044777bb7b9e3c828af 100644 (file)
@@ -570,7 +570,7 @@ vboxDomainSave(virDomainPtr dom, const char *path G_GNUC_UNUSED)
     if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0)
         goto cleanup;
 
-    rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+    rc = gVBoxAPI.UISession.OpenExisting(data, machine);
     if (NS_FAILED(rc))
         goto cleanup;
 
@@ -2436,7 +2436,7 @@ static int vboxDomainSuspend(virDomainPtr dom)
 
     if (gVBoxAPI.machineStateChecker.Running(state)) {
         /* set state pause */
-        gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+        gVBoxAPI.UISession.OpenExisting(data, machine);
         gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
         if (console) {
             gVBoxAPI.UIConsole.Pause(console);
@@ -2487,7 +2487,7 @@ static int vboxDomainResume(virDomainPtr dom)
 
     if (gVBoxAPI.machineStateChecker.Paused(state)) {
         /* resume the machine here */
-        gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+        gVBoxAPI.UISession.OpenExisting(data, machine);
         gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
         if (console) {
             gVBoxAPI.UIConsole.Resume(console);
@@ -2548,7 +2548,7 @@ static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
         goto cleanup;
     }
 
-    gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+    gVBoxAPI.UISession.OpenExisting(data, machine);
     gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
     if (console) {
         gVBoxAPI.UIConsole.PowerButton(console);
@@ -2596,7 +2596,7 @@ static int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
     gVBoxAPI.UIMachine.GetState(machine, &state);
 
     if (gVBoxAPI.machineStateChecker.Running(state)) {
-        gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+        gVBoxAPI.UISession.OpenExisting(data, machine);
         gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
         if (console) {
             gVBoxAPI.UIConsole.Reset(console);
@@ -2649,7 +2649,7 @@ static int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
         goto cleanup;
     }
 
-    gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+    gVBoxAPI.UISession.OpenExisting(data, machine);
     gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
     if (console) {
         gVBoxAPI.UIConsole.PowerDown(console);
@@ -4234,7 +4234,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom,
 
     if (gVBoxAPI.machineStateChecker.Running(state) ||
         gVBoxAPI.machineStateChecker.Paused(state)) {
-        rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+        rc = gVBoxAPI.UISession.OpenExisting(data, machine);
     } else {
         rc = gVBoxAPI.UISession.Open(data, machine);
     }
@@ -4353,7 +4353,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
 
     if (gVBoxAPI.machineStateChecker.Running(state) ||
         gVBoxAPI.machineStateChecker.Paused(state)) {
-        rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+        rc = gVBoxAPI.UISession.OpenExisting(data, machine);
     } else {
         rc = gVBoxAPI.UISession.Open(data, machine);
     }
@@ -5404,7 +5404,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
     }
 
     if (gVBoxAPI.machineStateChecker.Online(state)) {
-        rc = gVBoxAPI.UISession.OpenExisting(data, &domiid, machine);
+        rc = gVBoxAPI.UISession.OpenExisting(data, machine);
     } else {
         rc = gVBoxAPI.UISession.Open(data, machine);
     }
@@ -7305,7 +7305,7 @@ vboxDomainScreenshot(virDomainPtr dom,
     }
 
 
-    rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+    rc = gVBoxAPI.UISession.OpenExisting(data, machine);
     if (NS_SUCCEEDED(rc)) {
         rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
         if (NS_SUCCEEDED(rc) && console) {
@@ -7722,7 +7722,7 @@ vboxDomainSendKey(virDomainPtr dom,
     if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0)
         goto cleanup;
 
-    rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
+    rc = gVBoxAPI.UISession.OpenExisting(data, machine);
 
     if (NS_FAILED(rc)) {
         virReportError(VIR_ERR_OPERATION_FAILED,
index 3fbdf80abaa282635a45d49c0e5f624d1c69f789..7d3431208b530a67ae17b29a5be8f653a8f632e1 100644 (file)
@@ -1067,7 +1067,7 @@ _sessionOpen(struct _vboxDriver *data, IMachine *machine)
 }
 
 static nsresult
-_sessionOpenExisting(struct _vboxDriver *data, vboxIID *iid G_GNUC_UNUSED, IMachine *machine)
+_sessionOpenExisting(struct _vboxDriver *data, IMachine *machine)
 {
     return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Shared);
 }
index 10f58a2fe7b64614ad741eb3c809d00ae3fe9461..b5a71a338c3489af6eebb9c5c98fe293ca9e18dc 100644 (file)
@@ -228,7 +228,7 @@ typedef struct {
 /* Functions for ISession */
 typedef struct {
     nsresult (*Open)(struct _vboxDriver *driver, IMachine *machine);
-    nsresult (*OpenExisting)(struct _vboxDriver *driver, vboxIID *iid, IMachine *machine);
+    nsresult (*OpenExisting)(struct _vboxDriver *driver, IMachine *machine);
     nsresult (*GetConsole)(ISession *session, IConsole **console);
     nsresult (*GetMachine)(ISession *session, IMachine **machine);
     nsresult (*Close)(ISession *session);