aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-01-27 15:18:09 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-21 11:19:34 +0100
commit521f438e36b0265d66862e9cd35e4db82686ca9f (patch)
tree09934f974aef9eed87552883eec20cc5fb03ad92 /kvm-all.c
parent7c08db30e6a43f7083a881eb07bfbc878e001e08 (diff)
KVM: Use return value for error print
Commit 94ccff13 introduced a more verbose failure message and retry operations on KVM VM creation. However, it ended up using a variable for its failure message that hasn't been initialized yet. Fix it to use the value it meant to set. Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index f742f8dc24..979a8d952f 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1427,7 +1427,7 @@ int kvm_init(void)
} while (ret == -EINTR);
if (ret < 0) {
- fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -s->vmfd,
+ fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -ret,
strerror(-ret));
#ifdef TARGET_S390X