From 2c21ee769e4674348560480cecc7b20f3750ee84 Mon Sep 17 00:00:00 2001 From: Jianjun Duan Date: Thu, 19 Jan 2017 11:00:50 -0800 Subject: migration: extend VMStateInfo Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Jianjun Duan Message-Id: <1484852453-12728-2-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'migration/savevm.c') diff --git a/migration/savevm.c b/migration/savevm.c index f9c06e9f96..455d5bac1e 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -220,17 +220,20 @@ void timer_get(QEMUFile *f, QEMUTimer *ts) * Not in vmstate.c to not add qemu-timer.c as dependency to vmstate.c */ -static int get_timer(QEMUFile *f, void *pv, size_t size) +static int get_timer(QEMUFile *f, void *pv, size_t size, VMStateField *field) { QEMUTimer *v = pv; timer_get(f, v); return 0; } -static void put_timer(QEMUFile *f, void *pv, size_t size) +static int put_timer(QEMUFile *f, void *pv, size_t size, VMStateField *field, + QJSON *vmdesc) { QEMUTimer *v = pv; timer_put(f, v); + + return 0; } const VMStateInfo vmstate_info_timer = { -- cgit v1.2.3