#include "qemu/option.h"
#include "qemu/units.h"
#include "hw/qdev-core.h"
+#include "migration/blocker.h"
#include "ui/clipboard.h"
#include "ui/console.h"
#include "ui/input.h"
struct VDAgentChardev {
Chardev parent;
+ /* TODO: migration isn't yet supported */
+ Error *migration_blocker;
+
/* config */
bool mouse;
bool clipboard;
return;
#endif
+ if (migrate_add_blocker(vd->migration_blocker, errp) != 0) {
+ return;
+ }
+
vd->mouse = VDAGENT_MOUSE_DEFAULT;
if (cfg->has_mouse) {
vd->mouse = cfg->mouse;
VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj);
buffer_init(&vd->outbuf, "vdagent-outbuf");
+ error_setg(&vd->migration_blocker,
+ "The vdagent chardev doesn't yet support migration");
}
static void vdagent_chr_fini(Object *obj)
{
VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj);
+ migrate_del_blocker(vd->migration_blocker);
vdagent_disconnect(vd);
buffer_free(&vd->outbuf);
+ error_free(vd->migration_blocker);
}
static const TypeInfo vdagent_chr_type_info = {