]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: Drop @iid from UISession::Open()
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 22 Jan 2023 11:51:37 +0000 (12:51 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Jan 2023 09:23:53 +0000 (10:23 +0100)
The @iid argument of UISession::Open() 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_storage.c
src/vbox/vbox_tmpl.c
src/vbox/vbox_uniformed_api.h

index 24cdd6eeb946c585a0d8516beca116e528c621a1..a62714e78293aa232b30645d30e47411db318132 100644 (file)
@@ -1939,7 +1939,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
      * you can make changes to the machine setting
      */
     gVBoxAPI.UIMachine.GetId(machine, &mchiid);
-    gVBoxAPI.UISession.Open(data, &mchiid, machine);
+    gVBoxAPI.UISession.Open(data, machine);
     gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine);
 
     vboxSetBootDeviceOrder(def, data, machine);
@@ -2712,7 +2712,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
         goto cleanup;
     }
 
-    rc = gVBoxAPI.UISession.Open(data, &iid, machine);
+    rc = gVBoxAPI.UISession.Open(data, machine);
     if (NS_FAILED(rc))
         goto cleanup;
 
@@ -2872,7 +2872,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
     if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0)
         return -1;
 
-    rc = gVBoxAPI.UISession.Open(data, &iid, machine);
+    rc = gVBoxAPI.UISession.Open(data, machine);
     if (NS_SUCCEEDED(rc)) {
         gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine);
         if (machine) {
@@ -4236,7 +4236,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom,
         gVBoxAPI.machineStateChecker.Paused(state)) {
         rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
     } else {
-        rc = gVBoxAPI.UISession.Open(data, &iid, machine);
+        rc = gVBoxAPI.UISession.Open(data, machine);
     }
 
     if (NS_FAILED(rc))
@@ -4355,7 +4355,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
         gVBoxAPI.machineStateChecker.Paused(state)) {
         rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
     } else {
-        rc = gVBoxAPI.UISession.Open(data, &iid, machine);
+        rc = gVBoxAPI.UISession.Open(data, machine);
     }
 
     if (NS_FAILED(rc))
@@ -5406,7 +5406,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
     if (gVBoxAPI.machineStateChecker.Online(state)) {
         rc = gVBoxAPI.UISession.OpenExisting(data, &domiid, machine);
     } else {
-        rc = gVBoxAPI.UISession.Open(data, &domiid, machine);
+        rc = gVBoxAPI.UISession.Open(data, machine);
     }
 
     if (NS_SUCCEEDED(rc))
@@ -7225,7 +7225,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
         goto cleanup;
     }
 
-    rc = gVBoxAPI.UISession.Open(data, &domiid, machine);
+    rc = gVBoxAPI.UISession.Open(data, machine);
     if (NS_SUCCEEDED(rc))
         rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
     if (NS_FAILED(rc)) {
index f6ede700f9fa0b642a15c5b7dd888fe32cffa106..96c079192daaaa99d23b802e540c1803e385dac6 100644 (file)
@@ -573,7 +573,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
             break;
         }
 
-        if (NS_FAILED(gVBoxAPI.UISession.Open(data, &machineId, machine))) {
+        if (NS_FAILED(gVBoxAPI.UISession.Open(data, machine))) {
             vboxIIDUnalloc(&machineId);
             continue;
         }
index 8f7a2a6512cab84cf3fbb158b43371d54dbe7ec3..3fbdf80abaa282635a45d49c0e5f624d1c69f789 100644 (file)
@@ -1061,7 +1061,7 @@ _machineSaveSettings(IMachine *machine)
 }
 
 static nsresult
-_sessionOpen(struct _vboxDriver *data, vboxIID *iid G_GNUC_UNUSED, IMachine *machine)
+_sessionOpen(struct _vboxDriver *data, IMachine *machine)
 {
     return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Write);
 }
index 393e48827fd5a75350a607c878f4ac6d0abaf3e7..10f58a2fe7b64614ad741eb3c809d00ae3fe9461 100644 (file)
@@ -227,7 +227,7 @@ typedef struct {
 
 /* Functions for ISession */
 typedef struct {
-    nsresult (*Open)(struct _vboxDriver *driver, vboxIID *iid, IMachine *machine);
+    nsresult (*Open)(struct _vboxDriver *driver, IMachine *machine);
     nsresult (*OpenExisting)(struct _vboxDriver *driver, vboxIID *iid, IMachine *machine);
     nsresult (*GetConsole)(ISession *session, IConsole **console);
     nsresult (*GetMachine)(ISession *session, IMachine **machine);