提交 8ef4fe14 编写于 作者: E Eric Blake

openvz: reject unknown flags

* src/openvz/openvz_driver.c (openvzDomainReboot, openvzOpen):
Reject unknown flags.
上级 5037cea5
......@@ -613,12 +613,15 @@ cleanup:
}
static int openvzDomainReboot(virDomainPtr dom,
unsigned int flags ATTRIBUTE_UNUSED) {
unsigned int flags)
{
struct openvz_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
const char *prog[] = {VZCTL, "--quiet", "restart", PROGRAM_SENTINAL, NULL};
int ret = -1;
virCheckFlags(0, -1);
openvzDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
openvzDriverUnlock(driver);
......@@ -1283,10 +1286,12 @@ openvzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
static virDrvOpenStatus openvzOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags ATTRIBUTE_UNUSED)
unsigned int flags)
{
struct openvz_driver *driver;
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
if (conn->uri == NULL) {
if (!virFileExists("/proc/vz"))
return VIR_DRV_OPEN_DECLINED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册