qom: Declare GlobalProperty structure in 'qom/compat-properties.h'
While GlobalProperty is expected to only be used by QDev board layer, it is used by the lower QOM API, so define it in the qom/ namespace. This helps to build binary which use QOM but don't need the QDev layer. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Message-Id: <20260325151728.45378-4-philmd@linaro.org>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "system/blockdev.h"
|
||||
#include "qapi/qapi-types-machine.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/compat-properties.h"
|
||||
#include "qom/object.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "hw/core/resettable.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef QEMU_QDEV_PROPERTIES_H
|
||||
#define QEMU_QDEV_PROPERTIES_H
|
||||
|
||||
#include "qom/compat-properties.h"
|
||||
#include "hw/core/qdev.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -404,23 +404,6 @@ struct BusState {
|
||||
ResettableState reset;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef GlobalProperty - a global property type
|
||||
*
|
||||
* @used: Set to true if property was used when initializing a device.
|
||||
* @optional: If set to true, GlobalProperty will be skipped without errors
|
||||
* if the property doesn't exist.
|
||||
*
|
||||
* An error is fatal for non-hotplugged devices, when the global is applied.
|
||||
*/
|
||||
typedef struct GlobalProperty {
|
||||
const char *driver;
|
||||
const char *property;
|
||||
const char *value;
|
||||
bool used;
|
||||
bool optional;
|
||||
} GlobalProperty;
|
||||
|
||||
/*** Board API. This should go away once we have a machine config file. ***/
|
||||
|
||||
/**
|
||||
|
||||
32
include/qom/compat-properties.h
Normal file
32
include/qom/compat-properties.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* QEMU Object Model
|
||||
*
|
||||
* Copyright IBM, Corp. 2011
|
||||
*
|
||||
* Authors:
|
||||
* Anthony Liguori <aliguori@us.ibm.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef QEMU_COMPAT_PROPERTIES_H
|
||||
#define QEMU_COMPAT_PROPERTIES_H
|
||||
|
||||
/**
|
||||
* typedef GlobalProperty - a global property type
|
||||
*
|
||||
* @used: Set to true if property was used when initializing a device.
|
||||
* @optional: If set to true, GlobalProperty will be skipped without errors
|
||||
* if the property doesn't exist.
|
||||
*
|
||||
* An error is fatal for non-hotplugged devices, when the global is applied.
|
||||
*/
|
||||
typedef struct GlobalProperty {
|
||||
const char *driver;
|
||||
const char *property;
|
||||
const char *value;
|
||||
bool used;
|
||||
bool optional;
|
||||
} GlobalProperty;
|
||||
|
||||
#endif
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/core/qdev.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qom/compat-properties.h"
|
||||
#include "qom/object.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
Reference in New Issue
Block a user