From: Vincent Hanquez Date: Tue, 25 Aug 2009 16:44:37 +0000 (+0100) Subject: if the lib return a negative value propagate the exception upwards X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6d92fc29ea20ec203e282b2fc850a9c064360c44;p=xenclient%2Ftoolstack.git if the lib return a negative value propagate the exception upwards --- diff --git a/libs/xc/xc_stubs.c b/libs/xc/xc_stubs.c index 7ff73f2..dcb1a1a 100644 --- a/libs/xc/xc_stubs.c +++ b/libs/xc/xc_stubs.c @@ -1153,9 +1153,13 @@ CAMLprim value stub_xc_domain_send_s3resume(value handle, value domid) CAMLprim value stub_xc_domain_get_acpi_s_state(value handle, value domid) { CAMLparam2(handle, domid); - int state; - state = xc_domain_get_acpi_s_state(_H(handle), _D(domid)); - CAMLreturn(Val_int(state)); + int ret; + + ret = xc_domain_get_acpi_s_state(_H(handle), _D(domid)); + if (ret < 0) + failwith_xc(); + + CAMLreturn(Val_int(ret)); } /*