diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-02-05 12:35:48 +0000 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2025-02-10 15:45:04 +0100 |
commit | 696ae1ac91fc50f87838519a0717d74f5816fd50 (patch) | |
tree | 94a6aefebebba9adf33f3031687406816a39543b /qapi/qapi-util.c | |
parent | d8a22e69fec2aa495665ee95af1997651a20ca1f (diff) | |
download | qemu-696ae1ac91fc50f87838519a0717d74f5816fd50.zip qemu-696ae1ac91fc50f87838519a0717d74f5816fd50.tar.gz qemu-696ae1ac91fc50f87838519a0717d74f5816fd50.tar.bz2 |
qapi: change 'unsigned special_features' to 'uint64_t features'
The "special_features" field / parameter holds the subset of schema
features that are for internal code use. Specifically 'DEPRECATED'
and 'UNSTABLE'.
This special casing of internal features is going to be removed, so
prepare for that by renaming to 'features'. Using a fixed size type
is also best practice for bit fields.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250205123550.2754387-3-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi/qapi-util.c')
-rw-r--r-- | qapi/qapi-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index 65a7d18..3d849fe 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -37,19 +37,19 @@ static bool compat_policy_input_ok1(const char *adjective, } } -bool compat_policy_input_ok(unsigned special_features, +bool compat_policy_input_ok(uint64_t features, const CompatPolicy *policy, ErrorClass error_class, const char *kind, const char *name, Error **errp) { - if ((special_features & 1u << QAPI_DEPRECATED) + if ((features & 1u << QAPI_DEPRECATED) && !compat_policy_input_ok1("Deprecated", policy->deprecated_input, error_class, kind, name, errp)) { return false; } - if ((special_features & (1u << QAPI_UNSTABLE)) + if ((features & (1u << QAPI_UNSTABLE)) && !compat_policy_input_ok1("Unstable", policy->unstable_input, error_class, kind, name, errp)) { |