qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 2/5] qdev-properties: Add OptionalBool QAPI type


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 2/5] qdev-properties: Add OptionalBool QAPI type
Date: Wed, 3 Jan 2024 10:12:47 +0100
User-agent: Mozilla Thunderbird

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é <philmd@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).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]