aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:20 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:36 -0500
commit84e2e3eb5f20248ce85d11b8b751e2bd01d8fd95 (patch)
tree3273be0631e4876e9703ff020560fc8072c4ea81 /hw
parent50af324697cb91d3e7a820e2b94ee0237c0103e2 (diff)
vmstate: remove const for put operations
In a later patch, we introduce pre_save() and post_save() functions. The whole point of that operation is to change things in the state. Without this patch, we have to remove the const qualifier in each use with a cast Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/hw.h4
-rw-r--r--hw/pci.c2
-rw-r--r--hw/ptimer.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/hw/hw.h b/hw/hw.h
index cf266b315f..e40781503d 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -276,7 +276,7 @@ typedef struct VMStateDescription VMStateDescription;
struct VMStateInfo {
const char *name;
int (*get)(QEMUFile *f, void *pv, size_t size);
- void (*put)(QEMUFile *f, const void *pv, size_t size);
+ void (*put)(QEMUFile *f, void *pv, size_t size);
};
enum VMStateFlags {
@@ -534,7 +534,7 @@ extern const VMStateDescription vmstate_pci_device;
extern int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, int version_id);
extern void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
- const void *opaque);
+ void *opaque);
extern int vmstate_register(int instance_id, const VMStateDescription *vmsd,
void *base);
void vmstate_unregister(const VMStateDescription *vmsd, void *opaque);
diff --git a/hw/pci.c b/hw/pci.c
index 64d70ed237..c46410aae3 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -156,7 +156,7 @@ static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)
}
/* just put buffer */
-static void put_pci_config_device(QEMUFile *f, const void *pv, size_t size)
+static void put_pci_config_device(QEMUFile *f, void *pv, size_t size)
{
const uint8_t *v = pv;
qemu_put_buffer(f, v, size);
diff --git a/hw/ptimer.c b/hw/ptimer.c
index a4343b67c6..4ddbc597e6 100644
--- a/hw/ptimer.c
+++ b/hw/ptimer.c
@@ -220,9 +220,9 @@ static int get_ptimer(QEMUFile *f, void *pv, size_t size)
return 0;
}
-static void put_ptimer(QEMUFile *f, const void *pv, size_t size)
+static void put_ptimer(QEMUFile *f, void *pv, size_t size)
{
- ptimer_state *v = (void *)pv;
+ ptimer_state *v = pv;
qemu_put_ptimer(f, v);
}