diff options
author | Cornelia Huck <cohuck@redhat.com> | 2022-07-28 16:24:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-07-29 00:15:02 +0200 |
commit | 47c182fe8b03c0c40059fb95840923e65c9bdb4f (patch) | |
tree | 9a0d55a01c0dbcbe48e8c6718fb453cab8ed29fb /accel | |
parent | 705c881f7d8573d7520de2566396feb6a1223d57 (diff) | |
download | qemu-47c182fe8b03c0c40059fb95840923e65c9bdb4f.zip qemu-47c182fe8b03c0c40059fb95840923e65c9bdb4f.tar.gz qemu-47c182fe8b03c0c40059fb95840923e65c9bdb4f.tar.bz2 |
kvm: don't use perror() without useful errno
perror() is designed to append the decoded errno value to a
string. This, however, only makes sense if we called something that
actually sets errno prior to that.
For the callers that check for split irqchip support that is not the
case, and we end up with confusing error messages that end in
"success". Use error_report() instead.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20220728142446.438177-1-cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/kvm/kvm-all.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f165074..645f0a2 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2265,7 +2265,7 @@ static void kvm_irqchip_create(KVMState *s) ret = kvm_arch_irqchip_create(s); if (ret == 0) { if (s->kernel_irqchip_split == ON_OFF_AUTO_ON) { - perror("Split IRQ chip mode not supported."); + error_report("Split IRQ chip mode not supported."); exit(1); } else { ret = kvm_vm_ioctl(s, KVM_CREATE_IRQCHIP); |