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

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>
This commit is contained in:
Michal Privoznik 2023-01-22 12:49:29 +01:00
parent 22073dfc58
commit d983405ea2
3 changed files with 13 additions and 13 deletions

View 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,

View 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);
}

View 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);