From 844a3d34d684491b9a483a2d19f801f5b03f5569 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 1 Feb 2016 20:37:44 +0100 Subject: [PATCH] kvm-all: trace: strerror fixup Signed-off-by: Andrew Jones Message-Id: <1454355464-14999-1-git-send-email-drjones@redhat.com> Signed-off-by: Paolo Bonzini --- kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 9cc9ba6ea6..a65e73fb1d 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -2361,7 +2361,7 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source) reg.addr = (uintptr_t) source; r = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (r) { - trace_kvm_failed_reg_set(id, strerror(r)); + trace_kvm_failed_reg_set(id, strerror(-r)); } return r; } @@ -2375,7 +2375,7 @@ int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target) reg.addr = (uintptr_t) target; r = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (r) { - trace_kvm_failed_reg_get(id, strerror(r)); + trace_kvm_failed_reg_get(id, strerror(-r)); } return r; }