[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 7/9] machine: Add comment to abort path in machine_se
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 7/9] machine: Add comment to abort path in machine_set_kernel_irqchip |
Date: |
Wed, 27 Jul 2016 11:29:19 -0300 |
From: Greg Kurz <address@hidden>
We're not supposed to abort when the user passes a bogus value.
Since the checking is done in visit_type_OnOffSplit(), the call
to abort() is legitimate. Let's add a comment to make it
explicit.
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/core/machine.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 2fe6ff6..e5a456f 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -65,6 +65,9 @@ static void machine_set_kernel_irqchip(Object *obj, Visitor
*v,
ms->kernel_irqchip_split = true;
break;
default:
+ /* The value was checked in visit_type_OnOffSplit() above. If
+ * we get here, then something is wrong in QEMU.
+ */
abort();
}
}
--
2.5.5
- [Qemu-devel] [PULL 0/9] x86 and machine queue, 2016-07-27, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 1/9] exec: Reduce CONFIG_USER_ONLY ifdeffenery, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 2/9] exec: Don't use cpu_index to detect if cpu_exec_init()'s been called, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 3/9] exec: Set cpu_index only if it's not been explictly set, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 4/9] qdev: Fix object reference leak in case device.realize() fails, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 6/9] Revert "pc: Enforce adding CPUs contiguously and removing them in opposite order", Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 5/9] pc: Init CPUState->cpu_index with index in possible_cpus[], Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 7/9] machine: Add comment to abort path in machine_set_kernel_irqchip,
Eduardo Habkost <=
- [Qemu-devel] [PULL 8/9] qdev: ignore GlobalProperty.errp for hotplugged devices, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 9/9] vl: exit if a bad property value is passed to -global, Eduardo Habkost, 2016/07/27
- Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2016-07-27, Peter Maydell, 2016/07/28