aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-18 11:18:25 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-05 14:18:14 +0100
commitd36f165d9523a5d151f11888938fcc66a6dd10df (patch)
tree531195304568083712eb91cbf59452e615458351 /system
parent11b8920ed2093848f79f93d106afe8a69a61a523 (diff)
qdev: make properties array "const"
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets Rust bindings switch from "static mut" arrays to "static"; which is advantageous, because mutable statics are highly discouraged. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system')
-rw-r--r--system/qdev-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index 320c47b72d..21c6d16fb4 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -751,7 +751,7 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
#define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", ## __VA_ARGS__)
-static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
+static void qdev_print_props(Monitor *mon, DeviceState *dev, const Property *props,
int indent)
{
if (!props)