From: Roger Pau Monne Date: Tue, 3 May 2016 10:55:07 +0000 (+0200) Subject: tools/xsplice: fix mixing system errno values with Xen ones. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1164 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c1058b29cb1e5997b94ec6418a360d00106f257e;p=xen.git tools/xsplice: fix mixing system errno values with Xen ones. Avoid using system errno values when comparing with Xen errno values. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Release-acked-by: Wei Liu --- diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c index 4b23de6009..ddaa07911d 100644 --- a/tools/misc/xen-xsplice.c +++ b/tools/misc/xen-xsplice.c @@ -13,6 +13,8 @@ #include #include +#include + static xc_interface *xch; void show_help(void) @@ -233,7 +235,7 @@ struct { .function = xc_xsplice_revert, }, { .allow = XSPLICE_STATE_CHECKED, - .expected = -ENOENT, + .expected = -XEN_ENOENT, .name = "unload", .function = xc_xsplice_unload, }, @@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx) name, errno, strerror(errno)); return -1; } - if ( status.rc == -EAGAIN ) + if ( status.rc == -XEN_EAGAIN ) { fprintf(stderr, "%s failed. Operation already in progress\n", name); return -1; @@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx) if ( status.state != original_state ) break; - if ( status.rc && status.rc != -EAGAIN ) + if ( status.rc && status.rc != -XEN_EAGAIN ) { rc = status.rc; break;