diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 10cd5543bca5c53b36c0243021c806ecc0a3385d..da91687c102f233b56aaa311669f025b29cbfb0d 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -973,7 +973,10 @@ static void umlShutdownVMDaemon(virConnectPtr conn ATTRIBUTE_UNUSED, static virDrvOpenStatus umlOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, - unsigned int flags ATTRIBUTE_UNUSED) { + unsigned int flags) +{ + virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); + if (conn->uri == NULL) { if (uml_driver == NULL) return VIR_DRV_OPEN_DECLINED; @@ -1590,11 +1593,16 @@ cleanup: static char *umlDomainGetXMLDesc(virDomainPtr dom, - unsigned int flags ATTRIBUTE_UNUSED) { + unsigned int flags) +{ struct uml_driver *driver = dom->conn->privateData; virDomainObjPtr vm; char *ret = NULL; + virCheckFlags(VIR_DOMAIN_XML_SECURE | + VIR_DOMAIN_XML_INACTIVE | + VIR_DOMAIN_XML_UPDATE_CPU, NULL); + umlDriverLock(driver); vm = virDomainFindByUUID(&driver->domains, dom->uuid); umlDriverUnlock(driver); @@ -2078,12 +2086,14 @@ umlDomainBlockPeek(virDomainPtr dom, const char *path, unsigned long long offset, size_t size, void *buffer, - unsigned int flags ATTRIBUTE_UNUSED) + unsigned int flags) { struct uml_driver *driver = dom->conn->privateData; virDomainObjPtr vm; int fd = -1, ret = -1, i; + virCheckFlags(0, -1); + umlDriverLock(driver); vm = virDomainFindByUUID(&driver->domains, dom->uuid); umlDriverUnlock(driver);