master
h 40 lines 1.13 KB
Raw
1 /*
2 * QEMU Object Model
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12 #ifndef QEMU_COMPAT_PROPERTIES_H
13 #define QEMU_COMPAT_PROPERTIES_H
14
15 /**
16 * typedef GlobalProperty - a global property type
17 *
18 * @used: Set to true if property was used when initializing a device.
19 * @optional: If set to true, GlobalProperty will be skipped without errors
20 * if the property doesn't exist.
21 *
22 * An error is fatal for non-hotplugged devices, when the global is applied.
23 */
24 typedef struct GlobalProperty {
25 const char *driver;
26 const char *property;
27 const char *value;
28 bool used;
29 bool optional;
30 } GlobalProperty;
31
32 void object_set_machine_compat_props(GPtrArray *compat_props);
33 void object_set_accelerator_compat_props(GPtrArray *compat_props);
34 void object_register_sugar_prop(const char *driver, const char *prop,
35 const char *value, bool optional);
36 void object_apply_compat_props(Object *obj);
37 bool object_apply_global_props(Object *obj, const GPtrArray *props,
38 Error **errp);
39
40 #endif