Anthony Liguori <[email protected]> writes:
> This allows a machine to describe default devices that are only available
> when -nodefaults is not present.
>
> Signed-off-by: Anthony Liguori <[email protected]>
> ---
> hw/boards.h | 6 ++++++
> vl.c | 13 +++++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/hw/boards.h b/hw/boards.h
> index 813d0e5..85b2887 100644
> --- a/hw/boards.h
> +++ b/hw/boards.h
> @@ -18,6 +18,11 @@ typedef void QEMUMachineInitFunc(QEMUMachineInitArgs
> *args);
>
> typedef void QEMUMachineResetFunc(void);
>
> +typedef struct DeviceDescription {
> + const char *description;
> +} DeviceDescription;
A comment explaning syntax of @description (just like argument of
-device, as far as I can tell) would be nice.
Not sure wrapping in a struct is worth it.
> +
> +
> typedef struct QEMUMachine {
> const char *name;
> const char *alias;
> @@ -37,6 +42,7 @@ typedef struct QEMUMachine {
> GlobalProperty *compat_props;
> struct QEMUMachine *next;
> const char *hw_version;
> + DeviceDescription *default_devices;
> } QEMUMachine;
>
> int qemu_register_machine(QEMUMachine *m);
[...]