aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-01-27 15:18:09 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-02-27 10:54:41 -0600
commitd689974b513f29342d65ffc991c6c1a4437d5d1d (patch)
tree016dc00776084d4d09585edae0a5499647d714de
parente50218c2697812c7f2068f190a2868e4836874fe (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> (cherry picked from commit 521f438e36b0265d66862e9cd35e4db82686ca9f) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 951e6e343f..9f18ea38b9 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1436,7 +1436,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