mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
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>
This commit is contained in:
parent
d8a22e69fe
commit
696ae1ac91
13 changed files with 34 additions and 34 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue