Even though we don't accept any flags, it is unfriendly to callers that use the modern API to have to fall back to the flag-free API. Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> --- src/vbox/vbox_common.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 54e31bec9d..44c98cadf6 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -553,7 +553,8 @@ static int vboxConnectClose(virConnectPtr conn) } static int -vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) +vboxDomainSaveFlags(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED, + const char *dxml, unsigned int flags) { vboxDriverPtr data = dom->conn->privateData; IConsole *console = NULL; @@ -564,6 +565,9 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) nsresult rc; int ret = -1; + virCheckFlags(0, -1); + virCheckNonNullArgReturn(dxml, -1); + if (!data->vboxObj) return ret; @@ -607,6 +611,12 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) return ret; } +static int +vboxDomainSave(virDomainPtr dom, const char *path) +{ + return vboxDomainSaveFlags(dom, path, NULL, 0); +} + static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version) { vboxDriverPtr data = conn->privateData; @@ -2717,7 +2727,8 @@ static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) { return osType; } -static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) +static int vboxDomainSetMemoryFlags(virDomainPtr dom, unsigned long memory, + unsigned int flags) { vboxDriverPtr data = dom->conn->privateData; IMachine *machine = NULL; @@ -2727,6 +2738,8 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) nsresult rc; int ret = -1; + virCheckFlags(0, -1); + if (!data->vboxObj) return ret; @@ -2775,6 +2788,11 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) return ret; } +static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) +{ + return vboxDomainSetMemoryFlags(dom, memory, 0); +} + static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) { vboxDriverPtr data = dom->conn->privateData; @@ -7995,9 +8013,11 @@ static virHypervisorDriver vboxCommonDriver = { .domainDestroyFlags = vboxDomainDestroyFlags, /* 0.9.4 */ .domainGetOSType = vboxDomainGetOSType, /* 0.6.3 */ .domainSetMemory = vboxDomainSetMemory, /* 0.6.3 */ + .domainSetMemoryFlags = vboxDomainSetMemoryFlags, /* 5.6.0 */ .domainGetInfo = vboxDomainGetInfo, /* 0.6.3 */ .domainGetState = vboxDomainGetState, /* 0.9.2 */ .domainSave = vboxDomainSave, /* 0.6.3 */ + .domainSaveFlags = vboxDomainSaveFlags, /* 5.6.0 */ .domainSetVcpus = vboxDomainSetVcpus, /* 0.7.1 */ .domainSetVcpusFlags = vboxDomainSetVcpusFlags, /* 0.8.5 */ .domainGetVcpusFlags = vboxDomainGetVcpusFlags, /* 0.8.5 */ -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list