mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
phyp: Add various vir*Flags API
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@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
cb55026732
commit
b7acc9a66b
@ -1657,7 +1657,9 @@ phypGetVIOSFreeSCSIAdapter(virConnectPtr conn)
|
||||
|
||||
|
||||
static int
|
||||
phypDomainAttachDevice(virDomainPtr domain, const char *xml)
|
||||
phypDomainAttachDeviceFlags(virDomainPtr domain,
|
||||
const char *xml,
|
||||
unsigned int flags)
|
||||
{
|
||||
int result = -1;
|
||||
virConnectPtr conn = domain->conn;
|
||||
@ -1677,6 +1679,8 @@ phypDomainAttachDevice(virDomainPtr domain, const char *xml)
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
char *domain_name = NULL;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
if (!(def = virDomainDefNew()))
|
||||
goto cleanup;
|
||||
|
||||
@ -1808,6 +1812,12 @@ phypDomainAttachDevice(virDomainPtr domain, const char *xml)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
phypDomainAttachDevice(virDomainPtr domain, const char *xml)
|
||||
{
|
||||
return phypDomainAttachDeviceFlags(domain, xml, 0);
|
||||
}
|
||||
|
||||
static char *
|
||||
phypStorageVolGetKey(virConnectPtr conn, const char *name)
|
||||
{
|
||||
@ -3330,7 +3340,7 @@ phypDomainReboot(virDomainPtr dom, unsigned int flags)
|
||||
}
|
||||
|
||||
static int
|
||||
phypDomainShutdown(virDomainPtr dom)
|
||||
phypDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
|
||||
{
|
||||
int result = -1;
|
||||
virConnectPtr conn = dom->conn;
|
||||
@ -3342,6 +3352,8 @@ phypDomainShutdown(virDomainPtr dom)
|
||||
char *ret = NULL;
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
virBufferAddLit(&buf, "chsysstate");
|
||||
if (system_type == HMC)
|
||||
virBufferAsprintf(&buf, " -m %s", managed_system);
|
||||
@ -3359,6 +3371,12 @@ phypDomainShutdown(virDomainPtr dom)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
phypDomainShutdown(virDomainPtr dom)
|
||||
{
|
||||
return phypDomainShutdownFlags(dom, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
|
||||
{
|
||||
@ -3675,6 +3693,7 @@ static virHypervisorDriver phypHypervisorDriver = {
|
||||
.domainLookupByName = phypDomainLookupByName, /* 0.7.0 */
|
||||
.domainResume = phypDomainResume, /* 0.7.0 */
|
||||
.domainShutdown = phypDomainShutdown, /* 0.7.0 */
|
||||
.domainShutdownFlags = phypDomainShutdownFlags, /* 5.6.0 */
|
||||
.domainReboot = phypDomainReboot, /* 0.9.1 */
|
||||
.domainDestroy = phypDomainDestroy, /* 0.7.3 */
|
||||
.domainDestroyFlags = phypDomainDestroyFlags, /* 0.9.4 */
|
||||
@ -3688,6 +3707,7 @@ static virHypervisorDriver phypHypervisorDriver = {
|
||||
.connectListDefinedDomains = phypConnectListDefinedDomains, /* 0.7.0 */
|
||||
.connectNumOfDefinedDomains = phypConnectNumOfDefinedDomains, /* 0.7.0 */
|
||||
.domainAttachDevice = phypDomainAttachDevice, /* 0.8.2 */
|
||||
.domainAttachDeviceFlags = phypDomainAttachDeviceFlags, /* 5.6.0 */
|
||||
.connectIsEncrypted = phypConnectIsEncrypted, /* 0.7.3 */
|
||||
.connectIsSecure = phypConnectIsSecure, /* 0.7.3 */
|
||||
.domainIsUpdated = phypDomainIsUpdated, /* 0.8.6 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user