On 2024/07/15 20:47, Daniel P. Berrangé wrote:
On Sun, Jul 14, 2024 at 02:11:02PM +0900, Akihiko Odaki wrote:
DEFINE_PROP_ON_OFF_AUTO_BIT64() corresponds to DEFINE_PROP_ON_OFF_AUTO()
as DEFINE_PROP_BIT64() corresponds to DEFINE_PROP_BOOL(). The difference
is that DEFINE_PROP_ON_OFF_AUTO_BIT64() exposes OnOffAuto instead of
bool.

IMHO this shouldn't be implemented in terms of On/Off auto,
as it is misleadingly accepting much more than PROP_ON_OFF
accepts. Rather it should be just DEFINE_PROP_AUTO_BIT64,
implemented in terms of 'bool', with an extra 'auto' value.

I defined it in a way consistent with DEFINE_PROP_ON_OFF_AUTO(). A union of 'bool' and 'auto' would have a behavior somewhat inconsistent with DEFINE_PROP_ON_OFF_AUTO().

Regards,
Akihiko Odaki

Reply via email to