mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
phyp: reject unknown flags
* src/phyp/phyp_driver.c (phypOpen, phypDomainReboot) (phypVIOSDriverOpen): Reject unknown flags.
This commit is contained in:
parent
8ef4fe1425
commit
76f40fa55f
@ -1128,7 +1128,7 @@ exit:
|
||||
|
||||
static virDrvOpenStatus
|
||||
phypOpen(virConnectPtr conn,
|
||||
virConnectAuthPtr auth, unsigned int flags ATTRIBUTE_UNUSED)
|
||||
virConnectAuthPtr auth, unsigned int flags)
|
||||
{
|
||||
LIBSSH2_SESSION *session = NULL;
|
||||
ConnectionData *connection_data = NULL;
|
||||
@ -1138,6 +1138,8 @@ phypOpen(virConnectPtr conn,
|
||||
char *char_ptr;
|
||||
char *managed_system = NULL;
|
||||
|
||||
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||
|
||||
if (!conn || !conn->uri)
|
||||
return VIR_DRV_OPEN_DECLINED;
|
||||
|
||||
@ -3389,7 +3391,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
phypDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED)
|
||||
phypDomainReboot(virDomainPtr dom, unsigned int flags)
|
||||
{
|
||||
int result = -1;
|
||||
ConnectionData *connection_data = dom->conn->networkPrivateData;
|
||||
@ -3402,6 +3404,8 @@ phypDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED)
|
||||
char *ret = NULL;
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
virBufferAddLit(&buf, "chsysstate");
|
||||
if (system_type == HMC)
|
||||
virBufferAsprintf(&buf, " -m %s", managed_system);
|
||||
@ -3726,8 +3730,10 @@ phypDomainSetCPU(virDomainPtr dom, unsigned int nvcpus)
|
||||
static virDrvOpenStatus
|
||||
phypVIOSDriverOpen(virConnectPtr conn,
|
||||
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
|
||||
unsigned int flags ATTRIBUTE_UNUSED)
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||
|
||||
if (conn->driver->no != VIR_DRV_PHYP)
|
||||
return VIR_DRV_OPEN_DECLINED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user