vmstate: constify VMStateField

Because they are supposed to remain const.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181114132931.22624-1-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-11-14 17:29:30 +04:00 committed by Paolo Bonzini
parent 5aaac46793
commit 03fee66fde
22 changed files with 162 additions and 135 deletions

View file

@ -688,8 +688,8 @@ void shpc_cap_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int l)
shpc_cap_update_dword(d);
}
static int shpc_save(QEMUFile *f, void *pv, size_t size, VMStateField *field,
QJSON *vmdesc)
static int shpc_save(QEMUFile *f, void *pv, size_t size,
const VMStateField *field, QJSON *vmdesc)
{
PCIDevice *d = container_of(pv, PCIDevice, shpc);
qemu_put_buffer(f, d->shpc->config, SHPC_SIZEOF(d));
@ -697,7 +697,8 @@ static int shpc_save(QEMUFile *f, void *pv, size_t size, VMStateField *field,
return 0;
}
static int shpc_load(QEMUFile *f, void *pv, size_t size, VMStateField *field)
static int shpc_load(QEMUFile *f, void *pv, size_t size,
const VMStateField *field)
{
PCIDevice *d = container_of(pv, PCIDevice, shpc);
int ret = qemu_get_buffer(f, d->shpc->config, SHPC_SIZEOF(d));