qapi: Factor out compat_policy_input_ok()
commit7ce5fc63c75d0ac756fd0b4d0472774de17f8fec
authorMarkus Armbruster <armbru@redhat.com>
Thu, 28 Oct 2021 10:25:19 +0000 (28 12:25 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 29 Oct 2021 19:27:20 +0000 (29 21:27 +0200)
treebcab77bc0c0f51f58b4307afc089714bb1f12f00
parentc8688760437aaf4bfa9012ff5aef8ab1c92a38e1
qapi: Factor out compat_policy_input_ok()

The code to check policy for handling deprecated input is triplicated.
Factor it out into compat_policy_input_ok() before I mess with it in
the next commit.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211028102520.747396-9-armbru@redhat.com>
[Policy code moved from qmp-dispatch.c to qapi-util.c to make visitors
link without qmp-dispatch.o]
include/qapi/compat-policy.h
qapi/qapi-util.c
qapi/qapi-visit-core.c
qapi/qmp-dispatch.c
qapi/qobject-input-visitor.c