> >  #ifdef CONFIG_SPICE
> > +SpiceInfo *qmp_query_spice(Error **errp)
> > +{
> > +    if (!using_spice) {
> > +        return NULL;
> > +    }
> > +    return qemu_spice.query(errp);
> > +}
> > +
> 
> It's a bit weird to put the qmp function in the hmp file.

Yes, it should go to qmp-cmds.c instead.

The #ifdef CONFIG_SPICE should not be needed.  Also the !using_spice
case should throw an error.  Or, even better, just have a
qemu_spice_query_stub() function throwing an error, then the
!using_spice check can be dropped.

take care,
  Gerd


Reply via email to