diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-02-02 13:04:45 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-02-07 13:52:41 +0100 |
commit | acbac4a1dc974a3915760b4551336544c4360241 (patch) | |
tree | 61f8000dbffdf20314072197ef5644a66ed22dd7 /hw/qdev-properties.c | |
parent | 68ee356941801d0a17fdc43b11ac3e6b72fcd597 (diff) | |
download | qemu-acbac4a1dc974a3915760b4551336544c4360241.zip qemu-acbac4a1dc974a3915760b4551336544c4360241.tar.gz qemu-acbac4a1dc974a3915760b4551336544c4360241.tar.bz2 |
qdev: remove parse method for string properties
We need the print method to put double quotes, but parsing is not special.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r-- | hw/qdev-properties.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 5e19ec8..1fc77b5 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -510,16 +510,6 @@ PropertyInfo qdev_prop_hex64 = { /* --- string --- */ -static int parse_string(DeviceState *dev, Property *prop, const char *str) -{ - char **ptr = qdev_get_prop_ptr(dev, prop); - - if (*ptr) - g_free(*ptr); - *ptr = g_strdup(str); - return 0; -} - static void free_string(DeviceState *dev, Property *prop) { g_free(*(char **)qdev_get_prop_ptr(dev, prop)); @@ -581,7 +571,6 @@ PropertyInfo qdev_prop_string = { .name = "string", .type = PROP_TYPE_STRING, .size = sizeof(char*), - .parse = parse_string, .print = print_string, .free = free_string, .get = get_string, |