mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qmp hmp: Factor out common "using spice" test
Into qemu_using_spice(). For want of a better place, put it next the existing monitor command handler dummies in qemu-spice.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
83761b9244
commit
b25d81ba33
3 changed files with 16 additions and 10 deletions
|
@ -88,4 +88,14 @@ static inline int qemu_spice_display_add_client(int csock, int skipauth,
|
|||
|
||||
#endif /* CONFIG_SPICE */
|
||||
|
||||
static inline bool qemu_using_spice(Error **errp)
|
||||
{
|
||||
if (!using_spice) {
|
||||
/* correct one? spice isn't a device ,,, */
|
||||
error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* QEMU_SPICE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue