mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qapi: New -compat deprecated-input=crash
Policy "crash" calls abort() when deprecated input is received. Bugs in integration tests may mask the error from policy "reject". Provide a larger hammer: crash outright. Masking that seems unlikely. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210318155519.1224118-12-armbru@redhat.com>
This commit is contained in:
+2
-1
@@ -11,11 +11,12 @@
|
||||
#
|
||||
# @accept: Accept silently
|
||||
# @reject: Reject with an error
|
||||
# @crash: abort() the process
|
||||
#
|
||||
# Since: 6.0
|
||||
##
|
||||
{ 'enum': 'CompatPolicyInput',
|
||||
'data': [ 'accept', 'reject' ] }
|
||||
'data': [ 'accept', 'reject', 'crash' ] }
|
||||
|
||||
##
|
||||
# @CompatPolicyOutput:
|
||||
|
||||
@@ -185,6 +185,7 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
|
||||
"Deprecated command %s disabled by policy",
|
||||
command);
|
||||
goto out;
|
||||
case COMPAT_POLICY_INPUT_CRASH:
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -676,6 +676,7 @@ static bool qobject_input_deprecated_accept(Visitor *v, const char *name,
|
||||
error_setg(errp, "Deprecated parameter '%s' disabled by policy",
|
||||
name);
|
||||
return false;
|
||||
case COMPAT_POLICY_INPUT_CRASH:
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user