[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 16/29] libxl: check for xc_domain_shutdown failure in libxl__domain_suspend_common_callback
On Wed, 2013-10-30 at 20:51 +1300, Matthew Daley wrote: > 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); This returns -1 and sets errno I think, if so then ret is largely uninteresting. If you want to print errno you can use LOGE() and if ret really was an errno val then LOGEV() will do the right thing, I think. > + return 0; > + } > /* The guest does not (need to) respond to this sort of request. */ > dss->guest_responded = 1; > } else { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |