]> xenbits.xen.org Git - xenclient/toolstack.git/commitdiff
if the lib return a negative value propagate the exception upwards
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Tue, 25 Aug 2009 16:44:37 +0000 (17:44 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Tue, 25 Aug 2009 16:44:37 +0000 (17:44 +0100)
libs/xc/xc_stubs.c

index 7ff73f2c483c205c53a99c33f7c10a6b411ef378..dcb1a1ae81767b96ef8b26dd4b84437ee8121d80 100644 (file)
@@ -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));
 }
 
 /*