diff options
author | Dmitry Voronetskiy <vda1999@yandex.ru> | 2021-05-19 14:35:28 +0300 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-06-05 21:01:17 +0200 |
commit | d84451d38e9a36ff08af9b1424ecca51ba45e3ac (patch) | |
tree | 84f585e411a8ace001b7f454e1ec1a1aeab2d96a /hw/i386/kvm/ioapic.c | |
parent | 0d42cd5c1d370701c9f17367115244fbaedd2ea1 (diff) |
i386/kvm: The value passed to strerror should be positive
Signed-off-by: Dmitry Voronetskiy <vda1999@yandex.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210519113528.12474-1-davoronetskiy@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/i386/kvm/ioapic.c')
-rw-r--r-- | hw/i386/kvm/ioapic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 71a563181e..ee7c8ef68b 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -62,7 +62,7 @@ static void kvm_ioapic_get(IOAPICCommonState *s) chip.chip_id = KVM_IRQCHIP_IOAPIC; ret = kvm_vm_ioctl(kvm_state, KVM_GET_IRQCHIP, &chip); if (ret < 0) { - fprintf(stderr, "KVM_GET_IRQCHIP failed: %s\n", strerror(ret)); + fprintf(stderr, "KVM_GET_IRQCHIP failed: %s\n", strerror(-ret)); abort(); } @@ -95,7 +95,7 @@ static void kvm_ioapic_put(IOAPICCommonState *s) ret = kvm_vm_ioctl(kvm_state, KVM_SET_IRQCHIP, &chip); if (ret < 0) { - fprintf(stderr, "KVM_SET_IRQCHIP failed: %s\n", strerror(ret)); + fprintf(stderr, "KVM_SET_IRQCHIP failed: %s\n", strerror(-ret)); abort(); } } |