On 2/1/24 23:44, Richard Henderson wrote:
On 1/3/24 03:04, Philippe Mathieu-Daudé wrote:
To be able to distinct whether a boolean qdev property
has been set or not, add the DEFINE_PROP_BOOL_NODEFAULT()
qdev macro based on the tri-state OptionalBool QAPI type.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
qapi/common.json | 16 ++++++++++++++++
include/hw/qdev-properties.h | 5 +++++
hw/core/qdev-properties.c | 10 ++++++++++
3 files changed, 31 insertions(+)
How is this different from OnOffAuto?
I am trying to not break CLI which expects true/false and not on/off.
We could extend OnOffAuto to parse true/false if preferred.
(The particular device used as example in this series is not - yet -
user-creatable, so this doesn't matter there).