* Peter Xu (pet...@redhat.com) wrote: > Introduce qmp_cap_enabled() and qmp_oob_enabled() helpers. > > Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > monitor.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/monitor.c b/monitor.c > index 097312e65f..9666115259 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1038,6 +1038,16 @@ static void monitor_init_qmp_commands(void) > qmp_marshal_qmp_capabilities, QCO_NO_OPTIONS); > } > > +static bool qmp_cap_enabled(Monitor *mon, QMPCapability cap) > +{ > + return mon->qmp.qmp_caps[cap]; > +} > + > +static bool qmp_oob_enabled(Monitor *mon) > +{ > + return qmp_cap_enabled(mon, QMP_CAPABILITY_OOB); > +} > + > static void qmp_caps_check(Monitor *mon, QMPCapabilityList *list, > Error **errp) > { > -- > 2.14.3 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK