diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index c1d91e46839ac3bad49f1c5cab7aa74a49a26c6d..d50ecf16ffb919ab358977671f5062991e9fcb79 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -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;