The @iid argument of UISession::OpenExisting() callback is
unused. Drop it and also its propagation from parent functions.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/vbox/vbox_common.c | 22 +++++++++++-----------
src/vbox/vbox_tmpl.c | 2 +-
src/vbox/vbox_uniformed_api.h | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 8e9d6f466f..4bd118b308 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -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;
@@ -2435,7 +2435,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);
@@ -2486,7 +2486,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);
@@ -2547,7 +2547,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);
@@ -2595,7 +2595,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);
@@ -2648,7 +2648,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);
@@ -4233,7 +4233,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);
}
@@ -4352,7 +4352,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);
}
@@ -5403,7 +5403,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);
}
@@ -7304,7 +7304,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) {
@@ -7721,7 +7721,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,
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index c7c8b353f9..f8c3fbbdb9 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1066,7 +1066,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);
}
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 10f58a2fe7..b5a71a338c 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -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);
--
2.39.1