[libvirt] [PATCH v2 8/9] uml: start using virDomainObjCheckActive

Clementine Hayat clem at lse.epita.fr
Tue Apr 17 22:13:33 UTC 2018


Signed-off-by: Clementine Hayat <clem at lse.epita.fr>
---
 src/uml/uml_driver.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index ac168ce77..56dfd7b58 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2584,11 +2584,8 @@ umlDomainOpenConsole(virDomainPtr dom,
     if (virDomainOpenConsoleEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
-    if (!virDomainObjIsActive(vm)) {
-        virReportError(VIR_ERR_OPERATION_INVALID,
-                        "%s", _("domain is not running"));
+    if (virDomainObjCheckActive(vm) < 0)
         goto cleanup;
-    }
 
     if (dev_name) {
         for (i = 0; i < vm->def->nconsoles; i++) {
-- 
2.17.0




More information about the libvir-list mailing list