mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
vbox: Rewrite vboxDomainSnapshotCreateXML
The vboxDomainSnapshotCreateXML integrated the snapshot redefine with this patch: http://www.redhat.com/archives/libvir-list/2014-May/msg00589.html This patch introduced vboxSnapshotRedefine in vboxUniformedAPI to enable the features. This patch replace all version specified APIs to the uniformed api, then, moving the whole implementation to vbox_common.c. As there is only API level changes, the behavior of the function doesn't change. Some old version's defects has brought to the new one. The already known things are: *goto cleanup in a loop without releasing the pointers in the loop. *When function failed after machine unregister, no roll back to recovery it and the virtual machine would disappear.
This commit is contained in:
parent
51d1a29dd8
commit
677ecdc070
File diff suppressed because it is too large
Load Diff
@ -247,6 +247,24 @@ enum MediumType
|
||||
MediumType_Writethrough = 2,
|
||||
};
|
||||
|
||||
enum CleanupMode
|
||||
{
|
||||
CleanupMode_UnregisterOnly = 1,
|
||||
CleanupMode_DetachAllReturnNone = 2,
|
||||
CleanupMode_DetachAllReturnHardDisksOnly = 3,
|
||||
CleanupMode_Full = 4
|
||||
};
|
||||
|
||||
enum MediumVariant
|
||||
{
|
||||
MediumVariant_Standard = 0,
|
||||
MediumVariant_VmdkSplit2G = 0x01,
|
||||
MediumVariant_VmdkStreamOptimized = 0x04,
|
||||
MediumVariant_VmdkESX = 0x08,
|
||||
MediumVariant_Fixed = 0x10000,
|
||||
MediumVariant_Diff = 0x20000
|
||||
};
|
||||
|
||||
/* Simplied definitions in vbox_CAPI_*.h */
|
||||
|
||||
typedef void const *PCVBOXXPCOM;
|
||||
|
1087
src/vbox/vbox_tmpl.c
1087
src/vbox/vbox_tmpl.c
File diff suppressed because it is too large
Load Diff
@ -552,6 +552,11 @@ int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
int vboxDomainDetachDevice(virDomainPtr dom, const char *xml);
|
||||
int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
unsigned int flags);
|
||||
virDomainSnapshotPtr
|
||||
vboxDomainSnapshotCreateXML(virDomainPtr dom,
|
||||
const char *xmlDesc,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
/* Version specified functions for installing uniformed API */
|
||||
void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user