vbox: Drop @iid from UISession::Open()

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>
This commit is contained in:
Michal Privoznik 2023-01-22 12:51:37 +01:00
parent 8bf9fc0032
commit 22073dfc58
4 changed files with 10 additions and 10 deletions

View File

@ -1939,7 +1939,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
* you can make changes to the machine setting * you can make changes to the machine setting
*/ */
gVBoxAPI.UIMachine.GetId(machine, &mchiid); gVBoxAPI.UIMachine.GetId(machine, &mchiid);
gVBoxAPI.UISession.Open(data, &mchiid, machine); gVBoxAPI.UISession.Open(data, machine);
gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine); gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine);
vboxSetBootDeviceOrder(def, data, machine); vboxSetBootDeviceOrder(def, data, machine);
@ -2712,7 +2712,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
goto cleanup; goto cleanup;
} }
rc = gVBoxAPI.UISession.Open(data, &iid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
if (NS_FAILED(rc)) if (NS_FAILED(rc))
goto cleanup; goto cleanup;
@ -2872,7 +2872,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0) if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0)
return -1; return -1;
rc = gVBoxAPI.UISession.Open(data, &iid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
if (NS_SUCCEEDED(rc)) { if (NS_SUCCEEDED(rc)) {
gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine); gVBoxAPI.UISession.GetMachine(data->vboxSession, &machine);
if (machine) { if (machine) {
@ -4236,7 +4236,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom,
gVBoxAPI.machineStateChecker.Paused(state)) { gVBoxAPI.machineStateChecker.Paused(state)) {
rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
} else { } else {
rc = gVBoxAPI.UISession.Open(data, &iid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
} }
if (NS_FAILED(rc)) if (NS_FAILED(rc))
@ -4355,7 +4355,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
gVBoxAPI.machineStateChecker.Paused(state)) { gVBoxAPI.machineStateChecker.Paused(state)) {
rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine); rc = gVBoxAPI.UISession.OpenExisting(data, &iid, machine);
} else { } else {
rc = gVBoxAPI.UISession.Open(data, &iid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
} }
if (NS_FAILED(rc)) if (NS_FAILED(rc))
@ -5406,7 +5406,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
if (gVBoxAPI.machineStateChecker.Online(state)) { if (gVBoxAPI.machineStateChecker.Online(state)) {
rc = gVBoxAPI.UISession.OpenExisting(data, &domiid, machine); rc = gVBoxAPI.UISession.OpenExisting(data, &domiid, machine);
} else { } else {
rc = gVBoxAPI.UISession.Open(data, &domiid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
} }
if (NS_SUCCEEDED(rc)) if (NS_SUCCEEDED(rc))
@ -7225,7 +7225,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
goto cleanup; goto cleanup;
} }
rc = gVBoxAPI.UISession.Open(data, &domiid, machine); rc = gVBoxAPI.UISession.Open(data, machine);
if (NS_SUCCEEDED(rc)) if (NS_SUCCEEDED(rc))
rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {

View File

@ -573,7 +573,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
break; break;
} }
if (NS_FAILED(gVBoxAPI.UISession.Open(data, &machineId, machine))) { if (NS_FAILED(gVBoxAPI.UISession.Open(data, machine))) {
vboxIIDUnalloc(&machineId); vboxIIDUnalloc(&machineId);
continue; continue;
} }

View File

@ -1061,7 +1061,7 @@ _machineSaveSettings(IMachine *machine)
} }
static nsresult 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); return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Write);
} }

View File

@ -227,7 +227,7 @@ typedef struct {
/* Functions for ISession */ /* Functions for ISession */
typedef struct { 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 (*OpenExisting)(struct _vboxDriver *driver, vboxIID *iid, IMachine *machine);
nsresult (*GetConsole)(ISession *session, IConsole **console); nsresult (*GetConsole)(ISession *session, IConsole **console);
nsresult (*GetMachine)(ISession *session, IMachine **machine); nsresult (*GetMachine)(ISession *session, IMachine **machine);