From: Roger Pau Monne Date: Tue, 3 May 2016 10:55:06 +0000 (+0200) Subject: tools/xsplice: corrently use errno X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1165 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=52efa01ed2566691d42f8cd83dd05a1fea6b7032;p=xen.git tools/xsplice: corrently use errno Some error paths incorrectly used rc instead of errno. 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 b3bf04843d..4b23de6009 100644 --- a/tools/misc/xen-xsplice.c +++ b/tools/misc/xen-xsplice.c @@ -272,8 +272,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc = xc_xsplice_get(xch, name, &status); if ( rc ) { - fprintf(stderr, "%s failed to get status (rc=%d, %s)!\n", - name, -rc, strerror(-rc)); + fprintf(stderr, "%s failed to get status %d(%s)!\n", + name, errno, strerror(errno)); return -1; } if ( status.rc == -EAGAIN ) @@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc = action_options[idx].function(xch, name, 0); if ( rc ) { - fprintf(stderr, "%s failed with %d(%s)\n", name, -rc, strerror(-rc)); + fprintf(stderr, "%s failed with %d(%s)\n", name, errno, + strerror(errno)); return -1; } }