]> Git Repo - qemu.git/commitdiff
kvm-all: trace: strerror fixup
authorAndrew Jones <[email protected]>
Mon, 1 Feb 2016 19:37:44 +0000 (20:37 +0100)
committerPaolo Bonzini <[email protected]>
Tue, 9 Feb 2016 14:45:26 +0000 (15:45 +0100)
Signed-off-by: Andrew Jones <[email protected]>
Message-Id: <1454355464[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
kvm-all.c

index 9cc9ba6ea6fdfaee58b56e84b7c5fee0068e1546..a65e73fb1d64b4f58eb418e97263513ef870be0a 100644 (file)
--- 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, &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, &reg);
     if (r) {
-        trace_kvm_failed_reg_get(id, strerror(r));
+        trace_kvm_failed_reg_get(id, strerror(-r));
     }
     return r;
 }
This page took 0.023388 seconds and 4 git commands to generate.