Gleb Natapov wrote:
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 0ac1c28..3e6bef1 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)
if (r == -1)
perror("kvm_set_irq_level");
- if (status)
+ if (status) {
+#if defined(KVM_CAP_IRQ_INJECT_STATUS) && defined(KVM_IRQ_LINE_STATUS)
*status = (kvm->irqchip_inject_ioctl == KVM_IRQ_LINE) ?
1 : event.status;
+#else
+ *status = 1;
+#endif
+ }
return 1;
}
Isn't #ifdef KVM_CAP_... sufficient? If it is defined it should imply
everything needed for injection status is defined and works.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html