mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
vbox: Drop code supporting old VBox version
Now that only supported version of VirtualBox is 7.0.x the code that supports older versions can be dropped. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
335bceb115
commit
da9a804f4e
@ -604,11 +604,7 @@ _virtualboxGetMachine(IVirtualBox *vboxObj, vboxIID *iid, IMachine **machine)
|
||||
static nsresult
|
||||
_virtualboxOpenMachine(IVirtualBox *vboxObj, PRUnichar *settingsFile, IMachine **machine)
|
||||
{
|
||||
#if VBOX_API_VERSION >= 7000000
|
||||
return vboxObj->vtbl->OpenMachine(vboxObj, settingsFile, NULL, machine);
|
||||
#else
|
||||
return vboxObj->vtbl->OpenMachine(vboxObj, settingsFile, machine);
|
||||
#endif
|
||||
}
|
||||
|
||||
static nsresult
|
||||
@ -636,7 +632,6 @@ _virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMachine *
|
||||
vboxIIDFromUUID(&iid, def->uuid);
|
||||
createFlags = g_strdup_printf("UUID=%s,forceOverwrite=0", uuidstr);
|
||||
VBOX_UTF8_TO_UTF16(createFlags, &createFlagsUtf16);
|
||||
#if VBOX_API_VERSION >= 7000000
|
||||
rc = data->vboxObj->vtbl->CreateMachine(data->vboxObj,
|
||||
NULL,
|
||||
machineNameUtf16,
|
||||
@ -648,16 +643,6 @@ _virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMachine *
|
||||
NULL,
|
||||
NULL,
|
||||
machine);
|
||||
#else
|
||||
rc = data->vboxObj->vtbl->CreateMachine(data->vboxObj,
|
||||
NULL,
|
||||
machineNameUtf16,
|
||||
0,
|
||||
nsnull,
|
||||
nsnull,
|
||||
createFlagsUtf16,
|
||||
machine);
|
||||
#endif
|
||||
VIR_FREE(createFlags);
|
||||
VBOX_UTF16_FREE(machineNameUtf16);
|
||||
VBOX_UTF16_FREE(createFlagsUtf16);
|
||||
@ -840,7 +825,6 @@ _machineGetBIOSSettings(IMachine *machine, IBIOSSettings **bios)
|
||||
static nsresult
|
||||
_machineGetAudioAdapter(IMachine *machine, IAudioAdapter **audioadapter)
|
||||
{
|
||||
#if VBOX_API_VERSION >= 7000000
|
||||
IAudioSettings *audioSettings = NULL;
|
||||
nsresult rc;
|
||||
|
||||
@ -848,9 +832,6 @@ _machineGetAudioAdapter(IMachine *machine, IAudioAdapter **audioadapter)
|
||||
if (NS_FAILED(rc))
|
||||
return rc;
|
||||
return audioSettings->vtbl->GetAdapter(audioSettings, audioadapter);
|
||||
#else
|
||||
return machine->vtbl->GetAudioAdapter(machine, audioadapter);
|
||||
#endif
|
||||
}
|
||||
|
||||
static nsresult
|
||||
|
Loading…
x
Reference in New Issue
Block a user