@@ -261,7 +261,7 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
return olen;
}
-static void adb_kbd_save(QEMUFile *f, void *opaque)
+static int adb_kbd_save(QEMUFile *f, void *opaque)
{
KBDState *s = (KBDState *)opaque;
@@ -269,6 +269,8 @@ static void adb_kbd_save(QEMUFile *f, void *opaque)
qemu_put_sbe32s(f, &s->rptr);
qemu_put_sbe32s(f, &s->wptr);
qemu_put_sbe32s(f, &s->count);
+
+ return 0;
}
static int adb_kbd_load(QEMUFile *f, void *opaque, int version_id)
@@ -439,7 +441,7 @@ static int adb_mouse_reset(ADBDevice *d)
return 0;
}
-static void adb_mouse_save(QEMUFile *f, void *opaque)
+static int adb_mouse_save(QEMUFile *f, void *opaque)
{
MouseState *s = (MouseState *)opaque;
@@ -448,6 +450,8 @@ static void adb_mouse_save(QEMUFile *f, void *opaque)
qemu_put_sbe32s(f, &s->dx);
qemu_put_sbe32s(f, &s->dy);
qemu_put_sbe32s(f, &s->dz);
+
+ return 0;
}
static int adb_mouse_load(QEMUFile *f, void *opaque, int version_id)
@@ -105,7 +105,7 @@ static void ads7846_ts_event(void *opaque,
}
}
-static void ads7846_save(QEMUFile *f, void *opaque)
+static int ads7846_save(QEMUFile *f, void *opaque)
{
ADS7846State *s = (ADS7846State *) opaque;
int i;
@@ -115,6 +115,8 @@ static void ads7846_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->noise);
qemu_put_be32(f, s->cycle);
qemu_put_be32(f, s->output);
+
+ return 0;
}
static int ads7846_load(QEMUFile *f, void *opaque, int version_id)
@@ -653,7 +653,7 @@ static void gic_reset(gic_state *s)
#endif
}
-static void gic_save(QEMUFile *f, void *opaque)
+static int gic_save(QEMUFile *f, void *opaque)
{
gic_state *s = (gic_state *)opaque;
int i;
@@ -685,6 +685,8 @@ static void gic_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, s->irq_state[i].model);
qemu_put_byte(f, s->irq_state[i].trigger);
}
+
+ return 0;
}
static int gic_load(QEMUFile *f, void *opaque, int version_id)
@@ -140,13 +140,14 @@ static void arm_timer_tick(void *opaque)
arm_timer_update(s);
}
-static void arm_timer_save(QEMUFile *f, void *opaque)
+static int arm_timer_save(QEMUFile *f, void *opaque)
{
arm_timer_state *s = (arm_timer_state *)opaque;
qemu_put_be32(f, s->control);
qemu_put_be32(f, s->limit);
qemu_put_be32(f, s->int_level);
qemu_put_ptimer(f, s->timer);
+ return 0;
}
static int arm_timer_load(QEMUFile *f, void *opaque, int version_id)
@@ -235,11 +236,12 @@ static CPUWriteMemoryFunc * const sp804_writefn[] = {
sp804_write
};
-static void sp804_save(QEMUFile *f, void *opaque)
+static int sp804_save(QEMUFile *f, void *opaque)
{
sp804_state *s = (sp804_state *)opaque;
qemu_put_be32(f, s->level[0]);
qemu_put_be32(f, s->level[1]);
+ return 0;
}
static int sp804_load(QEMUFile *f, void *opaque, int version_id)
@@ -365,7 +365,7 @@ static void nvic_writel(void *opaque, uint32_t offset, uint32_t value)
}
}
-static void nvic_save(QEMUFile *f, void *opaque)
+static int nvic_save(QEMUFile *f, void *opaque)
{
nvic_state *s = (nvic_state *)opaque;
@@ -373,6 +373,8 @@ static void nvic_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->systick.reload);
qemu_put_be64(f, s->systick.tick);
qemu_put_timer(f, s->systick.timer);
+
+ return 0;
}
static int nvic_load(QEMUFile *f, void *opaque, int version_id)
@@ -654,7 +654,7 @@ static void cuda_save_timer(QEMUFile *f, CUDATimer *s)
qemu_put_timer(f, s->timer);
}
-static void cuda_save(QEMUFile *f, void *opaque)
+static int cuda_save(QEMUFile *f, void *opaque)
{
CUDAState *s = (CUDAState *)opaque;
@@ -677,6 +677,8 @@ static void cuda_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->tick_offset);
cuda_save_timer(f, &s->timers[0]);
cuda_save_timer(f, &s->timers[1]);
+
+ return 0;
}
static void cuda_load_timer(QEMUFile *f, CUDATimer *s)
@@ -564,7 +564,7 @@ static int g364fb_load(QEMUFile *f, void *opaque, int version_id)
return 0;
}
-static void g364fb_save(QEMUFile *f, void *opaque)
+static int g364fb_save(QEMUFile *f, void *opaque)
{
G364State *s = opaque;
int i;
@@ -581,6 +581,8 @@ static void g364fb_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->top_of_screen);
qemu_put_be32(f, s->width);
qemu_put_be32(f, s->height);
+
+ return 0;
}
int g364fb_mm_init(target_phys_addr_t vram_base,
@@ -57,11 +57,13 @@ static void pci_grackle_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(pic[irq_num + 0x15], level);
}
-static void pci_grackle_save(QEMUFile* f, void *opaque)
+static int pci_grackle_save(QEMUFile* f, void *opaque)
{
PCIDevice *d = opaque;
pci_device_save(d, f);
+
+ return 0;
}
static int pci_grackle_load(QEMUFile* f, void *opaque, int version_id)
@@ -1086,10 +1086,11 @@ static void gt64120_reset(void *opaque)
gt64120_pci_mapping(s);
}
-static void gt64120_save(QEMUFile* f, void *opaque)
+static int gt64120_save(QEMUFile* f, void *opaque)
{
PCIDevice *d = opaque;
pci_device_save(d, f);
+ return 0;
}
static int gt64120_load(QEMUFile* f, void *opaque, int version_id)
@@ -169,12 +169,14 @@ static void heathrow_pic_save_one(QEMUFile *f, HeathrowPIC *s)
qemu_put_be32s(f, &s->level_triggered);
}
-static void heathrow_pic_save(QEMUFile *f, void *opaque)
+static int heathrow_pic_save(QEMUFile *f, void *opaque)
{
HeathrowPICS *s = (HeathrowPICS *)opaque;
heathrow_pic_save_one(f, &s->pics[0]);
heathrow_pic_save_one(f, &s->pics[1]);
+
+ return 0;
}
static void heathrow_pic_load_one(QEMUFile *f, HeathrowPIC *s)
@@ -240,7 +240,7 @@ int64_t qemu_ftell(QEMUFile *f);
int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence);
typedef void SaveSetParamsHandler(int blk_enable, int shared, void * opaque);
-typedef void SaveStateHandler(QEMUFile *f, void *opaque);
+typedef int SaveStateHandler(QEMUFile *f, void *opaque);
typedef int SaveLiveStateHandler(Monitor *mon, QEMUFile *f, int stage,
void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
@@ -616,7 +616,7 @@ static void ivshmem_setup_msi(IVShmemState * s) {
s->eventfd_table = qemu_mallocz(s->vectors * sizeof(EventfdEntry));
}
-static void ivshmem_save(QEMUFile* f, void *opaque)
+static int ivshmem_save(QEMUFile* f, void *opaque)
{
IVShmemState *proxy = opaque;
@@ -630,6 +630,7 @@ static void ivshmem_save(QEMUFile* f, void *opaque)
qemu_put_be32(f, proxy->intrmask);
}
+ return 0;
}
static int ivshmem_load(QEMUFile* f, void *opaque, int version_id)
@@ -585,13 +585,15 @@ static CPUReadMemoryFunc * const nvram_read[] = {
&nvram_readl,
};
-static void m48t59_save(QEMUFile *f, void *opaque)
+static int m48t59_save(QEMUFile *f, void *opaque)
{
M48t59State *s = opaque;
qemu_put_8s(f, &s->lock);
qemu_put_be16s(f, &s->addr);
qemu_put_buffer(f, s->buffer, s->size);
+
+ return 0;
}
static int m48t59_load(QEMUFile *f, void *opaque, int version_id)
@@ -804,7 +804,7 @@ static CPUReadMemoryFunc * const dbdma_read[] = {
dbdma_readl,
};
-static void dbdma_save(QEMUFile *f, void *opaque)
+static int dbdma_save(QEMUFile *f, void *opaque)
{
DBDMA_channel *s = opaque;
unsigned int i, j;
@@ -812,6 +812,8 @@ static void dbdma_save(QEMUFile *f, void *opaque)
for (i = 0; i < DBDMA_CHANNELS; i++)
for (j = 0; j < DBDMA_REGS; j++)
qemu_put_be32s(f, &s[i].regs[j]);
+
+ return 0;
}
static int dbdma_load(QEMUFile *f, void *opaque, int version_id)
@@ -105,11 +105,13 @@ static CPUReadMemoryFunc * const nvram_read[] = {
&macio_nvram_readb,
};
-static void macio_nvram_save(QEMUFile *f, void *opaque)
+static int macio_nvram_save(QEMUFile *f, void *opaque)
{
MacIONVRAMState *s = (MacIONVRAMState *)opaque;
qemu_put_buffer(f, s->data, s->size);
+
+ return 0;
}
static int macio_nvram_load(QEMUFile *f, void *opaque, int version_id)
@@ -94,7 +94,7 @@ static uint32_t max111x_transfer(SSISlave *dev, uint32_t value)
return max111x_read(s);
}
-static void max111x_save(QEMUFile *f, void *opaque)
+static int max111x_save(QEMUFile *f, void *opaque)
{
MAX111xState *s = (MAX111xState *) opaque;
int i;
@@ -106,6 +106,8 @@ static void max111x_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->com);
for (i = 0; i < s->inputs; i ++)
qemu_put_byte(f, s->input[i]);
+
+ return 0;
}
static int max111x_load(QEMUFile *f, void *opaque, int version_id)
@@ -202,7 +202,7 @@ static void mipsnet_ioport_write(void *opaque, uint32_t addr, uint32_t val)
}
}
-static void mipsnet_save(QEMUFile *f, void *opaque)
+static int mipsnet_save(QEMUFile *f, void *opaque)
{
MIPSnetState *s = opaque;
@@ -214,6 +214,8 @@ static void mipsnet_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->intctl);
qemu_put_buffer(f, s->rx_buffer, MAX_ETH_FRAME_SIZE);
qemu_put_buffer(f, s->tx_buffer, MAX_ETH_FRAME_SIZE);
+
+ return 0;
}
static int mipsnet_load(QEMUFile *f, void *opaque, int version_id)
@@ -175,7 +175,7 @@ static CPUWriteMemoryFunc * const mst_fpga_writefn[] = {
mst_fpga_writeb,
};
-static void
+static int
mst_fpga_save(QEMUFile *f, void *opaque)
{
struct mst_irq_state *s = (mst_irq_state *) opaque;
@@ -193,6 +193,7 @@ mst_fpga_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->intsetclr);
qemu_put_be32s(f, &s->pcmcia0);
qemu_put_be32s(f, &s->pcmcia1);
+ return 0;
}
static int
@@ -281,7 +281,7 @@ static void nand_command(NANDFlashState *s)
}
}
-static void nand_save(QEMUFile *f, void *opaque)
+static int nand_save(QEMUFile *f, void *opaque)
{
NANDFlashState *s = (NANDFlashState *) opaque;
qemu_put_byte(f, s->cle);
@@ -299,6 +299,7 @@ static void nand_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->status);
qemu_put_be32(f, s->offset);
/* XXX: do we want to save s->storage too? */
+ return 0;
}
static int nand_load(QEMUFile *f, void *opaque, int version_id)
@@ -1052,7 +1052,7 @@ static void openpic_save_IRQ_queue(QEMUFile* f, IRQ_queue_t *q)
qemu_put_sbe32s(f, &q->priority);
}
-static void openpic_save(QEMUFile* f, void *opaque)
+static int openpic_save(QEMUFile* f, void *opaque)
{
openpic_t *opp = (openpic_t *)opaque;
unsigned int i;
@@ -1103,6 +1103,8 @@ static void openpic_save(QEMUFile* f, void *opaque)
#endif
pci_device_save(&opp->pci_dev, f);
+
+ return 0;
}
static void openpic_load_IRQ_queue(QEMUFile* f, IRQ_queue_t *q)
@@ -68,10 +68,11 @@ static void piix4_reset(void *opaque)
pci_conf[0xae] = 0x00;
}
-static void piix_save(QEMUFile* f, void *opaque)
+static int piix_save(QEMUFile* f, void *opaque)
{
PCIDevice *d = opaque;
pci_device_save(d, f);
+ return 0;
}
static int piix_load(QEMUFile* f, void *opaque, int version_id)
@@ -235,7 +235,7 @@ static CPUWriteMemoryFunc * const pl011_writefn[] = {
pl011_write
};
-static void pl011_save(QEMUFile *f, void *opaque)
+static int pl011_save(QEMUFile *f, void *opaque)
{
pl011_state *s = (pl011_state *)opaque;
int i;
@@ -256,6 +256,8 @@ static void pl011_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->read_pos);
qemu_put_be32(f, s->read_count);
qemu_put_be32(f, s->read_trigger);
+
+ return 0;
}
static int pl011_load(QEMUFile *f, void *opaque, int version_id)
@@ -239,7 +239,7 @@ static CPUWriteMemoryFunc * const pl022_writefn[] = {
pl022_write
};
-static void pl022_save(QEMUFile *f, void *opaque)
+static int pl022_save(QEMUFile *f, void *opaque)
{
pl022_state *s = (pl022_state *)opaque;
int i;
@@ -259,6 +259,8 @@ static void pl022_save(QEMUFile *f, void *opaque)
qemu_put_be16(f, s->tx_fifo[i]);
qemu_put_be16(f, s->rx_fifo[i]);
}
+
+ return 0;
}
static int pl022_load(QEMUFile *f, void *opaque, int version_id)
@@ -235,7 +235,7 @@ static CPUWriteMemoryFunc * const pl061_writefn[] = {
pl061_write
};
-static void pl061_save(QEMUFile *f, void *opaque)
+static int pl061_save(QEMUFile *f, void *opaque)
{
pl061_state *s = (pl061_state *)opaque;
@@ -259,6 +259,8 @@ static void pl061_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->den);
qemu_put_be32(f, s->cr);
qemu_put_be32(f, s->float_high);
+
+ return 0;
}
static int pl061_load(QEMUFile *f, void *opaque, int version_id)
@@ -298,7 +298,7 @@ static void ppc4xx_pci_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(pci_irqs[irq_num], level);
}
-static void ppc4xx_pci_save(QEMUFile *f, void *opaque)
+static int ppc4xx_pci_save(QEMUFile *f, void *opaque)
{
PPC4xxPCIState *controller = opaque;
int i;
@@ -316,6 +316,8 @@ static void ppc4xx_pci_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &controller->ptm[i].ms);
qemu_put_be32s(f, &controller->ptm[i].la);
}
+
+ return 0;
}
static int ppc4xx_pci_load(QEMUFile *f, void *opaque, int version_id)
@@ -216,7 +216,7 @@ static void mpc85xx_pci_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(pic[irq_num], level);
}
-static void ppce500_pci_save(QEMUFile *f, void *opaque)
+static int ppce500_pci_save(QEMUFile *f, void *opaque)
{
PPCE500PCIState *controller = opaque;
int i;
@@ -237,6 +237,8 @@ static void ppce500_pci_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &controller->pib[i].piwar);
}
qemu_put_be32s(f, &controller->gasket_time);
+
+ return 0;
}
static int ppce500_pci_load(QEMUFile *f, void *opaque, int version_id)
@@ -147,13 +147,15 @@ static CPUWriteMemoryFunc * const pxa2xx_pm_writefn[] = {
pxa2xx_pm_write,
};
-static void pxa2xx_pm_save(QEMUFile *f, void *opaque)
+static int pxa2xx_pm_save(QEMUFile *f, void *opaque)
{
PXA2xxState *s = (PXA2xxState *) opaque;
int i;
for (i = 0; i < 0x40; i ++)
qemu_put_be32s(f, &s->pm_regs[i]);
+
+ return 0;
}
static int pxa2xx_pm_load(QEMUFile *f, void *opaque, int version_id)
@@ -228,7 +230,7 @@ static CPUWriteMemoryFunc * const pxa2xx_cm_writefn[] = {
pxa2xx_cm_write,
};
-static void pxa2xx_cm_save(QEMUFile *f, void *opaque)
+static int pxa2xx_cm_save(QEMUFile *f, void *opaque)
{
PXA2xxState *s = (PXA2xxState *) opaque;
int i;
@@ -237,6 +239,8 @@ static void pxa2xx_cm_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->cm_regs[i]);
qemu_put_be32s(f, &s->clkcfg);
qemu_put_be32s(f, &s->pmnc);
+
+ return 0;
}
static int pxa2xx_cm_load(QEMUFile *f, void *opaque, int version_id)
@@ -528,13 +532,15 @@ static CPUWriteMemoryFunc * const pxa2xx_mm_writefn[] = {
pxa2xx_mm_write,
};
-static void pxa2xx_mm_save(QEMUFile *f, void *opaque)
+static int pxa2xx_mm_save(QEMUFile *f, void *opaque)
{
PXA2xxState *s = (PXA2xxState *) opaque;
int i;
for (i = 0; i < 0x1a; i ++)
qemu_put_be32s(f, &s->mm_regs[i]);
+
+ return 0;
}
static int pxa2xx_mm_load(QEMUFile *f, void *opaque, int version_id)
@@ -804,7 +810,7 @@ static CPUWriteMemoryFunc * const pxa2xx_ssp_writefn[] = {
pxa2xx_ssp_write,
};
-static void pxa2xx_ssp_save(QEMUFile *f, void *opaque)
+static int pxa2xx_ssp_save(QEMUFile *f, void *opaque)
{
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i;
@@ -824,6 +830,8 @@ static void pxa2xx_ssp_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, s->rx_level);
for (i = 0; i < s->rx_level; i ++)
qemu_put_byte(f, s->rx_fifo[(s->rx_start + i) & 0xf]);
+
+ return 0;
}
static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id)
@@ -1198,7 +1206,7 @@ static void pxa2xx_rtc_init(PXA2xxState *s)
s->rtc_pi = qemu_new_timer(rt_clock, pxa2xx_rtc_pi_tick, s);
}
-static void pxa2xx_rtc_save(QEMUFile *f, void *opaque)
+static int pxa2xx_rtc_save(QEMUFile *f, void *opaque)
{
PXA2xxState *s = (PXA2xxState *) opaque;
@@ -1224,6 +1232,8 @@ static void pxa2xx_rtc_save(QEMUFile *f, void *opaque)
qemu_put_sbe64s(f, &s->last_hz);
qemu_put_sbe64s(f, &s->last_sw);
qemu_put_sbe64s(f, &s->last_pi);
+
+ return 0;
}
static int pxa2xx_rtc_load(QEMUFile *f, void *opaque, int version_id)
@@ -1679,7 +1689,7 @@ static CPUWriteMemoryFunc * const pxa2xx_i2s_writefn[] = {
pxa2xx_i2s_write,
};
-static void pxa2xx_i2s_save(QEMUFile *f, void *opaque)
+static int pxa2xx_i2s_save(QEMUFile *f, void *opaque)
{
PXA2xxI2SState *s = (PXA2xxI2SState *) opaque;
@@ -1693,6 +1703,8 @@ static void pxa2xx_i2s_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->rx_len);
qemu_put_be32(f, s->tx_len);
qemu_put_be32(f, s->fifo_len);
+
+ return 0;
}
static int pxa2xx_i2s_load(QEMUFile *f, void *opaque, int version_id)
@@ -1955,7 +1967,7 @@ static void pxa2xx_fir_event(void *opaque, int event)
{
}
-static void pxa2xx_fir_save(QEMUFile *f, void *opaque)
+static int pxa2xx_fir_save(QEMUFile *f, void *opaque)
{
PXA2xxFIrState *s = (PXA2xxFIrState *) opaque;
int i;
@@ -1971,6 +1983,8 @@ static void pxa2xx_fir_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, s->rx_len);
for (i = 0; i < s->rx_len; i ++)
qemu_put_byte(f, s->rx_fifo[(s->rx_start + i) & 63]);
+
+ return 0;
}
static int pxa2xx_fir_load(QEMUFile *f, void *opaque, int version_id)
@@ -428,7 +428,7 @@ static CPUWriteMemoryFunc * const pxa2xx_dma_writefn[] = {
pxa2xx_dma_write
};
-static void pxa2xx_dma_save(QEMUFile *f, void *opaque)
+static int pxa2xx_dma_save(QEMUFile *f, void *opaque)
{
PXA2xxDMAState *s = (PXA2xxDMAState *) opaque;
int i;
@@ -452,6 +452,8 @@ static void pxa2xx_dma_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->chan[i].state);
qemu_put_be32(f, s->chan[i].request);
};
+
+ return 0;
}
static int pxa2xx_dma_load(QEMUFile *f, void *opaque, int version_id)
@@ -249,7 +249,7 @@ static CPUWriteMemoryFunc * const pxa2xx_gpio_writefn[] = {
pxa2xx_gpio_write
};
-static void pxa2xx_gpio_save(QEMUFile *f, void *opaque)
+static int pxa2xx_gpio_save(QEMUFile *f, void *opaque)
{
PXA2xxGPIOInfo *s = (PXA2xxGPIOInfo *) opaque;
int i;
@@ -268,6 +268,8 @@ static void pxa2xx_gpio_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->prev_level[i]);
}
+
+ return 0;
}
static int pxa2xx_gpio_load(QEMUFile *f, void *opaque, int version_id)
@@ -269,7 +269,7 @@ static CPUWriteMemoryFunc * const pxa2xx_keypad_writefn[] = {
pxa2xx_keypad_write
};
-static void pxa2xx_keypad_save(QEMUFile *f, void *opaque)
+static int pxa2xx_keypad_save(QEMUFile *f, void *opaque)
{
PXA2xxKeyPadState *s = (PXA2xxKeyPadState *) opaque;
@@ -284,6 +284,7 @@ static void pxa2xx_keypad_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->kpasmkp3);
qemu_put_be32s(f, &s->kpkdi);
+ return 0;
}
static int pxa2xx_keypad_load(QEMUFile *f, void *opaque, int version_id)
@@ -831,7 +831,7 @@ static void pxa2xx_lcdc_orientation(void *opaque, int angle)
pxa2xx_lcdc_resize(s);
}
-static void pxa2xx_lcdc_save(QEMUFile *f, void *opaque)
+static int pxa2xx_lcdc_save(QEMUFile *f, void *opaque)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
int i;
@@ -864,6 +864,8 @@ static void pxa2xx_lcdc_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->dma_ch[i].id);
qemu_put_be32s(f, &s->dma_ch[i].command);
}
+
+ return 0;
}
static int pxa2xx_lcdc_load(QEMUFile *f, void *opaque, int version_id)
@@ -439,7 +439,7 @@ static CPUWriteMemoryFunc * const pxa2xx_mmci_writefn[] = {
pxa2xx_mmci_writew
};
-static void pxa2xx_mmci_save(QEMUFile *f, void *opaque)
+static int pxa2xx_mmci_save(QEMUFile *f, void *opaque)
{
PXA2xxMMCIState *s = (PXA2xxMMCIState *) opaque;
int i;
@@ -471,6 +471,8 @@ static void pxa2xx_mmci_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, s->resp_len);
for (i = s->resp_len; i < 9; i ++)
qemu_put_be16s(f, &s->resp_fifo[i]);
+
+ return 0;
}
static int pxa2xx_mmci_load(QEMUFile *f, void *opaque, int version_id)
@@ -241,7 +241,7 @@ static CPUWriteMemoryFunc * const pxa2xx_pic_writefn[] = {
pxa2xx_pic_mem_write,
};
-static void pxa2xx_pic_save(QEMUFile *f, void *opaque)
+static int pxa2xx_pic_save(QEMUFile *f, void *opaque)
{
PXA2xxPICState *s = (PXA2xxPICState *) opaque;
int i;
@@ -255,6 +255,8 @@ static void pxa2xx_pic_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->int_idle);
for (i = 0; i < PXA2XX_PIC_SRCS; i ++)
qemu_put_be32s(f, &s->priority[i]);
+
+ return 0;
}
static int pxa2xx_pic_load(QEMUFile *f, void *opaque, int version_id)
@@ -360,7 +360,7 @@ static void pxa2xx_timer_tick4(void *opaque)
pxa2xx_timer_update4(i, qemu_get_clock(vm_clock), t->tm.num - 4);
}
-static void pxa2xx_timer_save(QEMUFile *f, void *opaque)
+static int pxa2xx_timer_save(QEMUFile *f, void *opaque)
{
pxa2xx_timer_info *s = (pxa2xx_timer_info *) opaque;
int i;
@@ -388,6 +388,8 @@ static void pxa2xx_timer_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->irq_enabled);
qemu_put_be32s(f, &s->reset3);
qemu_put_be32s(f, &s->snapshot);
+
+ return 0;
}
static int pxa2xx_timer_load(QEMUFile *f, void *opaque, int version_id)
@@ -650,7 +650,7 @@ static int rc4030_load(QEMUFile *f, void *opaque, int version_id)
return 0;
}
-static void rc4030_save(QEMUFile *f, void *opaque)
+static int rc4030_save(QEMUFile *f, void *opaque)
{
rc4030State* s = opaque;
int i, j;
@@ -675,6 +675,8 @@ static void rc4030_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->imr_jazz);
qemu_put_be32(f, s->isr_jazz);
qemu_put_be32(f, s->itr);
+
+ return 0;
}
void rc4030_dma_memory_rw(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write)
@@ -130,12 +130,14 @@ static void sl_writeb(void *opaque, target_phys_addr_t addr,
}
}
-static void sl_save(QEMUFile *f, void *opaque)
+static int sl_save(QEMUFile *f, void *opaque)
{
SLNANDState *s = (SLNANDState *) opaque;
qemu_put_8s(f, &s->ctl);
ecc_put(f, &s->ecc);
+
+ return 0;
}
static int sl_load(QEMUFile *f, void *opaque, int version_id)
@@ -447,7 +449,7 @@ static void spitz_keyboard_pre_map(SpitzKeyboardState *s)
#undef CTRL
#undef FN
-static void spitz_keyboard_save(QEMUFile *f, void *opaque)
+static int spitz_keyboard_save(QEMUFile *f, void *opaque)
{
SpitzKeyboardState *s = (SpitzKeyboardState *) opaque;
int i;
@@ -456,6 +458,8 @@ static void spitz_keyboard_save(QEMUFile *f, void *opaque)
qemu_put_be16s(f, &s->strobe_state);
for (i = 0; i < 5; i ++)
qemu_put_byte(f, spitz_gpio_invert[i]);
+
+ return 0;
}
static int spitz_keyboard_load(QEMUFile *f, void *opaque, int version_id)
@@ -591,11 +595,12 @@ static uint32_t spitz_lcdtg_transfer(SSISlave *dev, uint32_t value)
return 0;
}
-static void spitz_lcdtg_save(QEMUFile *f, void *opaque)
+static int spitz_lcdtg_save(QEMUFile *f, void *opaque)
{
SpitzLCDTG *s = (SpitzLCDTG *)opaque;
qemu_put_be32(f, s->bl_intensity);
qemu_put_be32(f, s->bl_power);
+ return 0;
}
static int spitz_lcdtg_load(QEMUFile *f, void *opaque, int version_id)
@@ -676,7 +681,7 @@ static void spitz_adc_temp_on(void *opaque, int line, int level)
max111x_set_input(max1111, MAX1111_BATT_TEMP, 0);
}
-static void spitz_ssp_save(QEMUFile *f, void *opaque)
+static int spitz_ssp_save(QEMUFile *f, void *opaque)
{
CorgiSSPState *s = (CorgiSSPState *)opaque;
int i;
@@ -684,6 +689,7 @@ static void spitz_ssp_save(QEMUFile *f, void *opaque)
for (i = 0; i < 3; i++) {
qemu_put_be32(f, s->enable[i]);
}
+ return 0;
}
static int spitz_ssp_load(QEMUFile *f, void *opaque, int version_id)
@@ -275,7 +275,7 @@ static void ssd0323_cd(void *opaque, int n, int level)
s->mode = level ? SSD0323_DATA : SSD0323_CMD;
}
-static void ssd0323_save(QEMUFile *f, void *opaque)
+static int ssd0323_save(QEMUFile *f, void *opaque)
{
ssd0323_state *s = (ssd0323_state *)opaque;
int i;
@@ -294,6 +294,8 @@ static void ssd0323_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->remap);
qemu_put_be32(f, s->mode);
qemu_put_buffer(f, s->framebuffer, sizeof(s->framebuffer));
+
+ return 0;
}
static int ssd0323_load(QEMUFile *f, void *opaque, int version_id)
@@ -191,7 +191,7 @@ static uint32_t ssi_sd_transfer(SSISlave *dev, uint32_t val)
return 0xff;
}
-static void ssi_sd_save(QEMUFile *f, void *opaque)
+static int ssi_sd_save(QEMUFile *f, void *opaque)
{
ssi_sd_state *s = (ssi_sd_state *)opaque;
int i;
@@ -205,6 +205,8 @@ static void ssi_sd_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->arglen);
qemu_put_be32(f, s->response_pos);
qemu_put_be32(f, s->stopping);
+
+ return 0;
}
static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id)
@@ -280,7 +280,7 @@ static CPUWriteMemoryFunc * const gptm_writefn[] = {
gptm_write
};
-static void gptm_save(QEMUFile *f, void *opaque)
+static int gptm_save(QEMUFile *f, void *opaque)
{
gptm_state *s = (gptm_state *)opaque;
@@ -305,6 +305,8 @@ static void gptm_save(QEMUFile *f, void *opaque)
qemu_put_be64(f, s->tick[1]);
qemu_put_timer(f, s->timer[0]);
qemu_put_timer(f, s->timer[1]);
+
+ return 0;
}
static int gptm_load(QEMUFile *f, void *opaque, int version_id)
@@ -604,7 +606,7 @@ static void ssys_reset(void *opaque)
s->dcgc[0] = 1;
}
-static void ssys_save(QEMUFile *f, void *opaque)
+static int ssys_save(QEMUFile *f, void *opaque)
{
ssys_state *s = (ssys_state *)opaque;
@@ -625,6 +627,8 @@ static void ssys_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->dcgc[2]);
qemu_put_be32(f, s->clkvclr);
qemu_put_be32(f, s->ldoarst);
+
+ return 0;
}
static int ssys_load(QEMUFile *f, void *opaque, int version_id)
@@ -842,7 +846,7 @@ static CPUWriteMemoryFunc * const stellaris_i2c_writefn[] = {
stellaris_i2c_write
};
-static void stellaris_i2c_save(QEMUFile *f, void *opaque)
+static int stellaris_i2c_save(QEMUFile *f, void *opaque)
{
stellaris_i2c_state *s = (stellaris_i2c_state *)opaque;
@@ -853,6 +857,8 @@ static void stellaris_i2c_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->mimr);
qemu_put_be32(f, s->mris);
qemu_put_be32(f, s->mcr);
+
+ return 0;
}
static int stellaris_i2c_load(QEMUFile *f, void *opaque, int version_id)
@@ -1127,7 +1133,7 @@ static CPUWriteMemoryFunc * const stellaris_adc_writefn[] = {
stellaris_adc_write
};
-static void stellaris_adc_save(QEMUFile *f, void *opaque)
+static int stellaris_adc_save(QEMUFile *f, void *opaque)
{
stellaris_adc_state *s = (stellaris_adc_state *)opaque;
int i;
@@ -1150,6 +1156,8 @@ static void stellaris_adc_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->ssctl[i]);
}
qemu_put_be32(f, s->noise);
+
+ return 0;
}
static int stellaris_adc_load(QEMUFile *f, void *opaque, int version_id)
@@ -1230,11 +1238,13 @@ static uint32_t stellaris_ssi_bus_transfer(SSISlave *dev, uint32_t val)
return ssi_transfer(s->bus[s->current_dev], val);
}
-static void stellaris_ssi_bus_save(QEMUFile *f, void *opaque)
+static int stellaris_ssi_bus_save(QEMUFile *f, void *opaque)
{
stellaris_ssi_bus_state *s = (stellaris_ssi_bus_state *)opaque;
qemu_put_be32(f, s->current_dev);
+
+ return 0;
}
static int stellaris_ssi_bus_load(QEMUFile *f, void *opaque, int version_id)
@@ -324,7 +324,7 @@ static void stellaris_enet_reset(stellaris_enet_state *s)
s->tx_frame_len = -1;
}
-static void stellaris_enet_save(QEMUFile *f, void *opaque)
+static int stellaris_enet_save(QEMUFile *f, void *opaque)
{
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
int i;
@@ -350,6 +350,8 @@ static void stellaris_enet_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->next_packet);
qemu_put_be32(f, s->rx_fifo - s->rx[s->next_packet].data);
qemu_put_be32(f, s->rx_fifo_len);
+
+ return 0;
}
static int stellaris_enet_load(QEMUFile *f, void *opaque, int version_id)
@@ -47,7 +47,7 @@ static void stellaris_gamepad_put_key(void * opaque, int keycode)
s->extension = 0;
}
-static void stellaris_gamepad_save(QEMUFile *f, void *opaque)
+static int stellaris_gamepad_save(QEMUFile *f, void *opaque)
{
gamepad_state *s = (gamepad_state *)opaque;
int i;
@@ -55,6 +55,8 @@ static void stellaris_gamepad_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->extension);
for (i = 0; i < s->num_buttons; i++)
qemu_put_byte(f, s->buttons[i].pressed);
+
+ return 0;
}
static int stellaris_gamepad_load(QEMUFile *f, void *opaque, int version_id)
@@ -457,7 +457,7 @@ static CPUWriteMemoryFunc * const syborg_fb_writefn[] = {
syborg_fb_write
};
-static void syborg_fb_save(QEMUFile *f, void *opaque)
+static int syborg_fb_save(QEMUFile *f, void *opaque)
{
SyborgFBState *s = opaque;
int i;
@@ -475,6 +475,8 @@ static void syborg_fb_save(QEMUFile *f, void *opaque)
for (i = 0; i < 256; i++) {
qemu_put_be32(f, s->raw_palette[i]);
}
+
+ return 0;
}
static int syborg_fb_load(QEMUFile *f, void *opaque, int version_id)
@@ -168,7 +168,7 @@ static CPUWriteMemoryFunc * const syborg_int_writefn[] = {
syborg_int_write
};
-static void syborg_int_save(QEMUFile *f, void *opaque)
+static int syborg_int_save(QEMUFile *f, void *opaque)
{
SyborgIntState *s = (SyborgIntState *)opaque;
int i;
@@ -179,6 +179,7 @@ static void syborg_int_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->flags[i].enabled
| ((unsigned)s->flags[i].level << 1));
}
+ return 0;
}
static int syborg_int_load(QEMUFile *f, void *opaque, int version_id)
@@ -165,7 +165,7 @@ static void syborg_keyboard_event(void *opaque, int keycode)
syborg_keyboard_update(s);
}
-static void syborg_keyboard_save(QEMUFile *f, void *opaque)
+static int syborg_keyboard_save(QEMUFile *f, void *opaque)
{
SyborgKeyboardState *s = (SyborgKeyboardState *)opaque;
int i;
@@ -178,6 +178,7 @@ static void syborg_keyboard_save(QEMUFile *f, void *opaque)
for (i = 0; i < s->fifo_size; i++) {
qemu_put_be32(f, s->key_fifo[i]);
}
+ return 0;
}
static int syborg_keyboard_load(QEMUFile *f, void *opaque, int version_id)
@@ -152,7 +152,7 @@ static void syborg_pointer_event(void *opaque, int dx, int dy, int dz,
syborg_pointer_update(s);
}
-static void syborg_pointer_save(QEMUFile *f, void *opaque)
+static int syborg_pointer_save(QEMUFile *f, void *opaque)
{
SyborgPointerState *s = (SyborgPointerState *)opaque;
int i;
@@ -168,6 +168,7 @@ static void syborg_pointer_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->event_fifo[i].z);
qemu_put_be32(f, s->event_fifo[i].pointer_buttons);
}
+ return 0;
}
static int syborg_pointer_load(QEMUFile *f, void *opaque, int version_id)
@@ -102,12 +102,14 @@ static CPUWriteMemoryFunc * const syborg_rtc_writefn[] = {
syborg_rtc_write
};
-static void syborg_rtc_save(QEMUFile *f, void *opaque)
+static int syborg_rtc_save(QEMUFile *f, void *opaque)
{
SyborgRTCState *s = opaque;
qemu_put_be64(f, s->offset);
qemu_put_be64(f, s->data);
+
+ return 0;
}
static int syborg_rtc_load(QEMUFile *f, void *opaque, int version_id)
@@ -273,7 +273,7 @@ static CPUWriteMemoryFunc * const syborg_serial_writefn[] = {
syborg_serial_write
};
-static void syborg_serial_save(QEMUFile *f, void *opaque)
+static int syborg_serial_save(QEMUFile *f, void *opaque)
{
SyborgSerialState *s = opaque;
int i;
@@ -288,6 +288,8 @@ static void syborg_serial_save(QEMUFile *f, void *opaque)
for (i = 0; i < s->fifo_size; i++) {
qemu_put_be32(f, s->read_fifo[i]);
}
+
+ return 0;
}
static int syborg_serial_load(QEMUFile *f, void *opaque, int version_id)
@@ -174,7 +174,7 @@ static CPUWriteMemoryFunc * const syborg_timer_writefn[] = {
syborg_timer_write
};
-static void syborg_timer_save(QEMUFile *f, void *opaque)
+static int syborg_timer_save(QEMUFile *f, void *opaque)
{
SyborgTimerState *s = opaque;
@@ -184,6 +184,8 @@ static void syborg_timer_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->int_level);
qemu_put_be32(f, s->int_enabled);
qemu_put_ptimer(f, s->timer);
+
+ return 0;
}
static int syborg_timer_load(QEMUFile *f, void *opaque, int version_id)
@@ -432,7 +432,7 @@ static void tsc2005_touchscreen_event(void *opaque,
tsc2005_pin_update(s);
}
-static void tsc2005_save(QEMUFile *f, void *opaque)
+static int tsc2005_save(QEMUFile *f, void *opaque)
{
TSC2005State *s = (TSC2005State *) opaque;
int i;
@@ -471,6 +471,8 @@ static void tsc2005_save(QEMUFile *f, void *opaque)
for (i = 0; i < 8; i ++)
qemu_put_be32(f, s->tr[i]);
+
+ return 0;
}
static int tsc2005_load(QEMUFile *f, void *opaque, int version_id)
@@ -1002,7 +1002,7 @@ static void tsc210x_i2s_set_rate(TSC210xState *s, int in, int out)
s->i2s_rx_rate = in;
}
-static void tsc210x_save(QEMUFile *f, void *opaque)
+static int tsc210x_save(QEMUFile *f, void *opaque)
{
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_get_clock(vm_clock);
@@ -1046,6 +1046,8 @@ static void tsc210x_save(QEMUFile *f, void *opaque)
for (i = 0; i < 0x14; i ++)
qemu_put_be16s(f, &s->filter_data[i]);
+
+ return 0;
}
static int tsc210x_load(QEMUFile *f, void *opaque, int version_id)
@@ -63,11 +63,13 @@ static void pci_unin_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(pic[unin_irq_line[irq_num]], level);
}
-static void pci_unin_save(QEMUFile* f, void *opaque)
+static int pci_unin_save(QEMUFile* f, void *opaque)
{
PCIDevice *d = opaque;
pci_device_save(d, f);
+
+ return 0;
}
static int pci_unin_load(QEMUFile* f, void *opaque, int version_id)
@@ -227,7 +227,7 @@ static void virtio_balloon_to_target(void *opaque, ram_addr_t target,
}
}
-static void virtio_balloon_save(QEMUFile *f, void *opaque)
+static int virtio_balloon_save(QEMUFile *f, void *opaque)
{
VirtIOBalloon *s = opaque;
@@ -235,6 +235,7 @@ static void virtio_balloon_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, s->num_pages);
qemu_put_be32(f, s->actual);
+ return 0;
}
static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id)
@@ -460,7 +460,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
return features;
}
-static void virtio_blk_save(QEMUFile *f, void *opaque)
+static int virtio_blk_save(QEMUFile *f, void *opaque)
{
VirtIOBlock *s = opaque;
VirtIOBlockReq *req = s->rq;
@@ -473,6 +473,8 @@ static void virtio_blk_save(QEMUFile *f, void *opaque)
req = req->next;
}
qemu_put_sbyte(f, 0);
+
+ return 0;
}
static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id)
@@ -779,7 +779,7 @@ static void virtio_net_tx_bh(void *opaque)
}
}
-static void virtio_net_save(QEMUFile *f, void *opaque)
+static int virtio_net_save(QEMUFile *f, void *opaque)
{
VirtIONet *n = opaque;
@@ -808,6 +808,8 @@ static void virtio_net_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, n->nouni);
qemu_put_byte(f, n->nobcast);
qemu_put_byte(f, n->has_ufo);
+
+ return 0;
}
static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
@@ -453,7 +453,7 @@ static void set_config(VirtIODevice *vdev, const uint8_t *config_data)
memcpy(&config, config_data, sizeof(config));
}
-static void virtio_serial_save(QEMUFile *f, void *opaque)
+static int virtio_serial_save(QEMUFile *f, void *opaque)
{
VirtIOSerial *s = opaque;
VirtIOSerialPort *port;
@@ -492,6 +492,8 @@ static void virtio_serial_save(QEMUFile *f, void *opaque)
qemu_put_byte(f, port->guest_connected);
qemu_put_byte(f, port->host_connected);
}
+
+ return 0;
}
static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id)
@@ -178,7 +178,7 @@ void scoop_gpio_out_set(ScoopInfo *s, int line,
s->handler[line] = handler;
}
-static void scoop_save(QEMUFile *f, void *opaque)
+static int scoop_save(QEMUFile *f, void *opaque)
{
ScoopInfo *s = (ScoopInfo *) opaque;
qemu_put_be16s(f, &s->status);
@@ -192,6 +192,8 @@ static void scoop_save(QEMUFile *f, void *opaque)
qemu_put_be16s(f, &s->irr);
qemu_put_be16s(f, &s->imr);
qemu_put_be16s(f, &s->isr);
+
+ return 0;
}
static int scoop_load(QEMUFile *f, void *opaque, int version_id)
@@ -256,7 +256,7 @@ typedef enum {
void cpu_exec_init_all(unsigned long tb_size);
/* CPU save/load. */
-void cpu_save(QEMUFile *f, void *opaque);
+int cpu_save(QEMUFile *f, void *opaque);
int cpu_load(QEMUFile *f, void *opaque, int version_id);
/* Force QEMU to stop what it's doing and service IO */
@@ -1387,8 +1387,7 @@ static int vmstate_save(QEMUFile *f, SaveStateEntry *se)
}
if (!se->vmsd) { /* Old style */
- se->save_state(f, se->opaque);
- return 0;
+ return se->save_state(f, se->opaque);
}
vmstate_save_state(f,se->vmsd, se->opaque);
@@ -193,7 +193,7 @@ static void slirp_init_once(void)
loopback_addr.s_addr = htonl(INADDR_LOOPBACK);
}
-static void slirp_state_save(QEMUFile *f, void *opaque);
+static int slirp_state_save(QEMUFile *f, void *opaque);
static int slirp_state_load(QEMUFile *f, void *opaque, int version_id);
Slirp *slirp_init(int restricted, struct in_addr vnetwork,
@@ -940,7 +940,7 @@ static void slirp_bootp_save(QEMUFile *f, Slirp *slirp)
}
}
-static void slirp_state_save(QEMUFile *f, void *opaque)
+static int slirp_state_save(QEMUFile *f, void *opaque)
{
Slirp *slirp = opaque;
struct ex_list *ex_ptr;
@@ -961,6 +961,8 @@ static void slirp_state_save(QEMUFile *f, void *opaque)
qemu_put_be16(f, slirp->ip_id);
slirp_bootp_save(f, slirp);
+
+ return 0;
}
static void slirp_tcp_load(QEMUFile *f, struct tcpcb *tp)
@@ -1,7 +1,7 @@
#include "hw/hw.h"
#include "hw/boards.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
int i;
CPUARMState *env = (CPUARMState *)opaque;
@@ -99,6 +99,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, env->teecr);
qemu_put_be32(f, env->teehbr);
}
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -1,7 +1,7 @@
#include "hw/hw.h"
#include "hw/boards.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
CPUCRISState *env = opaque;
int i;
@@ -42,6 +42,7 @@ void cpu_save(QEMUFile *f, void *opaque)
}
}
}
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -478,9 +478,10 @@ static const VMStateDescription vmstate_cpu = {
}
};
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
vmstate_save_state(f, &vmstate_cpu, opaque);
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -1,8 +1,9 @@
#include "hw/hw.h"
#include "hw/boards.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -40,7 +40,7 @@ static void save_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu)
qemu_put_be32s(f, &fpu->fcr31);
}
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
CPUState *env = opaque;
int i;
@@ -149,6 +149,7 @@ void cpu_save(QEMUFile *f, void *opaque)
save_tc(f, &env->tcs[i]);
for (i = 0; i < MIPS_FPU_MAX; i++)
save_fpu(f, &env->fpus[i]);
+ return 0;
}
static void load_tc(QEMUFile *f, TCState *tc)
@@ -2,7 +2,7 @@
#include "hw/boards.h"
#include "kvm.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
CPUState *env = (CPUState *)opaque;
unsigned int i, j;
@@ -87,6 +87,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_betls(f, &env->hflags_nmsr);
qemu_put_sbe32s(f, &env->mmu_idx);
qemu_put_sbe32s(f, &env->power_mode);
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -20,8 +20,9 @@
#include "hw/hw.h"
#include "hw/boards.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -4,7 +4,7 @@
#include "exec-all.h"
-void cpu_save(QEMUFile *f, void *opaque)
+int cpu_save(QEMUFile *f, void *opaque)
{
CPUState *env = opaque;
int i;
@@ -98,6 +98,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_be64s(f, &env->ssr);
cpu_put_timer(f, env->hstick);
#endif
+ return 0;
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)