diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-07-21 18:06:12 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-07-21 18:06:12 +0100 |
commit | 35858955e6c6f9ef41c199d15457c13426ac6434 (patch) | |
tree | 4c65353b98b5ffac28e35b1555929f832d390f11 /vl.c | |
parent | 147fc419734b057b9d9154c2ca0d9d397054104b (diff) | |
parent | b0ddb8bf6bf1739240640f353fd49e9e5d3f85dc (diff) | |
download | hqemu-35858955e6c6f9ef41c199d15457c13426ac6434.zip hqemu-35858955e6c6f9ef41c199d15457c13426ac6434.tar.gz |
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-2.1' into staging
QOM and device refactorings
* Machine: Property name fixups for 2.1 ABI
# gpg: Signature made Mon 21 Jul 2014 18:00:23 BST using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg: aka "Andreas Färber <afaerber@suse.com>"
* remotes/afaerber/tags/qom-devices-for-2.1:
machine: Replace underscores in machine's property names
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2823,15 +2823,25 @@ static int object_set_property(const char *name, const char *value, void *opaque Object *obj = OBJECT(opaque); StringInputVisitor *siv; Error *local_err = NULL; + char *c, *qom_name; if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0 || strcmp(name, "type") == 0) { return 0; } + qom_name = g_strdup(name); + c = qom_name; + while (*c++) { + if (*c == '_') { + *c = '-'; + } + } + siv = string_input_visitor_new(value); - object_property_set(obj, string_input_get_visitor(siv), name, &local_err); + object_property_set(obj, string_input_get_visitor(siv), qom_name, &local_err); string_input_visitor_cleanup(siv); + g_free(qom_name); if (local_err) { qerror_report_err(local_err); |