mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
vbox: Add more IStorageController API mappings
This patch exposes additional methods of the native VBOX API to the libvirt 'unified' vbox API to deal with IStorageController. The exposed methods are: * IStorageController->GetStorageControllerType() * IStorageController->SetStorageControllerType() * IMachine->GetStorageControllers()
This commit is contained in:
parent
1bf7e97733
commit
06c4fd10fd
@ -235,6 +235,19 @@ enum StorageBus
|
||||
StorageBus_SAS = 5
|
||||
};
|
||||
|
||||
enum StorageControllerType
|
||||
{
|
||||
StorageControllerType_Null = 0,
|
||||
StorageControllerType_LsiLogic = 1,
|
||||
StorageControllerType_BusLogic = 2,
|
||||
StorageControllerType_IntelAhci = 3,
|
||||
StorageControllerType_PIIX3 = 4,
|
||||
StorageControllerType_PIIX4 = 5,
|
||||
StorageControllerType_ICH6 = 6,
|
||||
StorageControllerType_I82078 = 7,
|
||||
StorageControllerType_LsiLogicSas = 8
|
||||
};
|
||||
|
||||
enum AccessMode
|
||||
{
|
||||
AccessMode_ReadOnly = 1,
|
||||
|
@ -572,6 +572,11 @@ static void* _handleUSBGetDeviceFilters(IUSBCommon *USBCommon)
|
||||
return USBCommon->vtbl->GetDeviceFilters;
|
||||
}
|
||||
|
||||
static void* _handleMachineGetStorageControllers(IMachine *machine)
|
||||
{
|
||||
return machine->vtbl->GetStorageControllers;
|
||||
}
|
||||
|
||||
static void* _handleMachineGetMediumAttachments(IMachine *machine)
|
||||
{
|
||||
return machine->vtbl->GetMediumAttachments;
|
||||
@ -1987,6 +1992,18 @@ _storageControllerGetBus(IStorageController *storageController, PRUint32 *bus)
|
||||
return storageController->vtbl->GetBus(storageController, bus);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
_storageControllerGetControllerType(IStorageController *storageController, PRUint32 *controllerType)
|
||||
{
|
||||
return storageController->vtbl->GetControllerType(storageController, controllerType);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
_storageControllerSetControllerType(IStorageController *storageController, PRUint32 controllerType)
|
||||
{
|
||||
return storageController->vtbl->SetControllerType(storageController, controllerType);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
_sharedFolderGetHostPath(ISharedFolder *sharedFolder, PRUnichar **hostPath)
|
||||
{
|
||||
@ -2336,6 +2353,7 @@ static vboxUniformedArray _UArray = {
|
||||
.handleGetMachines = _handleGetMachines,
|
||||
.handleGetHardDisks = _handleGetHardDisks,
|
||||
.handleUSBGetDeviceFilters = _handleUSBGetDeviceFilters,
|
||||
.handleMachineGetStorageControllers = _handleMachineGetStorageControllers,
|
||||
.handleMachineGetMediumAttachments = _handleMachineGetMediumAttachments,
|
||||
.handleMachineGetSharedFolders = _handleMachineGetSharedFolders,
|
||||
.handleSnapshotGetChildren = _handleSnapshotGetChildren,
|
||||
@ -2567,6 +2585,8 @@ static vboxUniformedIMediumAttachment _UIMediumAttachment = {
|
||||
|
||||
static vboxUniformedIStorageController _UIStorageController = {
|
||||
.GetBus = _storageControllerGetBus,
|
||||
.GetControllerType = _storageControllerGetControllerType,
|
||||
.SetControllerType = _storageControllerSetControllerType,
|
||||
};
|
||||
|
||||
static vboxUniformedISharedFolder _UISharedFolder = {
|
||||
|
@ -135,6 +135,7 @@ typedef struct {
|
||||
void* (*handleGetMachines)(IVirtualBox *vboxObj);
|
||||
void* (*handleGetHardDisks)(IVirtualBox *vboxObj);
|
||||
void* (*handleUSBGetDeviceFilters)(IUSBCommon *USBCommon);
|
||||
void* (*handleMachineGetStorageControllers)(IMachine *machine);
|
||||
void* (*handleMachineGetMediumAttachments)(IMachine *machine);
|
||||
void* (*handleMachineGetSharedFolders)(IMachine *machine);
|
||||
void* (*handleSnapshotGetChildren)(ISnapshot *snapshot);
|
||||
@ -410,6 +411,8 @@ typedef struct {
|
||||
/* Functions for IStorageController */
|
||||
typedef struct {
|
||||
nsresult (*GetBus)(IStorageController *storageController, PRUint32 *bus);
|
||||
nsresult (*SetControllerType)(IStorageController *storageController, PRUint32 controllerType);
|
||||
nsresult (*GetControllerType)(IStorageController *storageController, PRUint32 *controllerType);
|
||||
} vboxUniformedIStorageController;
|
||||
|
||||
/* Functions for ISharedFolder */
|
||||
|
Loading…
Reference in New Issue
Block a user