[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 16/29] libxl: check for xc_domain_shutdown failure in libxl__domain_suspend_common_callback



Coverity-ID: 1055048
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 tools/libxl/libxl_dom.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 5b9fd27..4606a12 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -1041,7 +1041,11 @@ int libxl__domain_suspend_common_callback(void *user)
 
     if (dss->hvm && (!hvm_pvdrv || hvm_s_state)) {
         LOG(DEBUG, "Calling xc_domain_shutdown on HVM domain");
-        xc_domain_shutdown(CTX->xch, domid, SHUTDOWN_suspend);
+        ret = xc_domain_shutdown(CTX->xch, domid, SHUTDOWN_suspend);
+        if (ret < 0) {
+            LOG(ERROR, "xc_domain_shutdown failed ret=%d", ret);
+            return 0;
+        }
         /* The guest does not (need to) respond to this sort of request. */
         dss->guest_responded = 1;
     } else {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.