summary refs log tree commit diff stats
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-01-23 12:11:38 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:15 +0100
commit385d8f222a30687f17ffff7a1a697be18de1cbe8 (patch)
treeaa1045a43daead08d9d60e924a5ddc173ef0e7d2 /include/hw/qdev-core.h
parent4f67d30b5e74e060b8dbe10528829b47345cd6e8 (diff)
downloadfocaccia-qemu-385d8f222a30687f17ffff7a1a697be18de1cbe8.tar.gz
focaccia-qemu-385d8f222a30687f17ffff7a1a697be18de1cbe8.zip
qdev: rename DeviceClass.props
Ensure that conflicts in the future will cause a syntax error.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 4065162251..506ad359c9 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -100,7 +100,12 @@ typedef struct DeviceClass {
     DECLARE_BITMAP(categories, DEVICE_CATEGORY_MAX);
     const char *fw_name;
     const char *desc;
-    Property *props;
+
+    /*
+     * The underscore at the end ensures a compile-time error if someone
+     * assigns to dc->props instead of using device_class_set_props.
+     */
+    Property *props_;
 
     /*
      * Can this device be instantiated with -device / device_add?