mirror of https://github.com/xemu-project/xemu.git
KVM: Use return value for error print
Commit94ccff13
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 commit521f438e36
) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
e50218c269
commit
d689974b51
|
@ -1436,7 +1436,7 @@ int kvm_init(void)
|
||||||
} while (ret == -EINTR);
|
} while (ret == -EINTR);
|
||||||
|
|
||||||
if (ret < 0) {
|
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));
|
strerror(-ret));
|
||||||
|
|
||||||
#ifdef TARGET_S390X
|
#ifdef TARGET_S390X
|
||||||
|
|
Loading…
Reference in New Issue