From 48fe3ca737e1c600cbb5a2989e3d397624b820cb Mon Sep 17 00:00:00 2001 Message-Id: <48fe3ca737e1c600cbb5a2989e3d397624b820cb.1369221838.git.minovotn@redhat.com> In-Reply-To: <44d9306ede26ea2881e6c1f104b901be647022a8.1369221838.git.minovotn@redhat.com> References: <44d9306ede26ea2881e6c1f104b901be647022a8.1369221838.git.minovotn@redhat.com> From: Gerd Hoffmann Date: Tue, 14 May 2013 11:11:11 +0200 Subject: [PATCH 4/8] constify value pointer for qdev_prop_set_string RH-Author: Gerd Hoffmann Message-id: <1368529872-8973-3-git-send-email-kraxel@redhat.com> Patchwork-id: 51351 O-Subject: [RHEL-6.5 qemu-kvm PATCH 2/3] constify value pointer for qdev_prop_set_string Bugzilla: 947416 RH-Acked-by: Laszlo Ersek RH-Acked-by: Kevin Wolf RH-Acked-by: Paolo Bonzini From: Christian Borntraeger qdev_prop_set_string uses object_property_set_str, which takes a const char * for the value. Lets propagate the constness into qdev_prop_set_string. Signed-off-by: Christian Borntraeger Signed-off-by: Anthony Liguori (cherry picked from commit 3b25597bcf7fa8c92ba2107fbdb260ce0eccd64b) --- hw/qdev-properties.c | 2 +- hw/qdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Signed-off-by: Michal Novotny --- hw/qdev-properties.c | 2 +- hw/qdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 3c47a98..52fe9ba 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -720,7 +720,7 @@ void qdev_prop_set_uint64(DeviceState *dev, const char *name, uint64_t value) qdev_prop_set(dev, name, &value, PROP_TYPE_UINT64); } -void qdev_prop_set_string(DeviceState *dev, const char *name, char *value) +void qdev_prop_set_string(DeviceState *dev, const char *name, const char *value) { qdev_prop_set(dev, name, &value, PROP_TYPE_STRING); } diff --git a/hw/qdev.h b/hw/qdev.h index 9574da1..3d74c9a 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -299,7 +299,7 @@ void qdev_prop_set_uint16(DeviceState *dev, const char *name, uint16_t value); void qdev_prop_set_uint32(DeviceState *dev, const char *name, uint32_t value); void qdev_prop_set_int32(DeviceState *dev, const char *name, int32_t value); void qdev_prop_set_uint64(DeviceState *dev, const char *name, uint64_t value); -void qdev_prop_set_string(DeviceState *dev, const char *name, char *value); +void qdev_prop_set_string(DeviceState *dev, const char *name, const char *value); void qdev_prop_set_chr(DeviceState *dev, const char *name, CharDriverState *value); void qdev_prop_set_netdev(DeviceState *dev, const char *name, VLANClientState *value); void qdev_prop_set_vlan(DeviceState *dev, const char *name, VLANState *value); -- 1.7.11.7