|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/xsplice: corrently use errno
commit 52efa01ed2566691d42f8cd83dd05a1fea6b7032
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Tue May 3 12:55:06 2016 +0200
Commit: Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed May 4 16:31:04 2016 +0100
tools/xsplice: corrently use errno
Some error paths incorrectly used rc instead of errno.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
tools/misc/xen-xsplice.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
index b3bf048..4b23de6 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;
}
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |