qemu/hw/null-machine.c
Eduardo Habkost 5f072e1f30 create struct for machine initialization arguments
This should help us to:
- More easily add or remove machine initialization arguments without
  having to change every single machine init function;
- More easily make mechanical changes involving the machine init
  functions in the future;
- Let machine initialization forward the init arguments to other
  functions more easily.

This change was half-mechanical process: first the struct was added with
the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local
variable initialization to all functions. Then the compiler helped me
locate the local variables that are unused, so they could be removed.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-20 07:53:28 +00:00

35 lines
637 B
C

/*
* Empty machine
*
* Copyright IBM, Corp. 2012
*
* Authors:
* Anthony Liguori <aliguori@us.ibm.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*
*/
#include "qemu-common.h"
#include "hw/hw.h"
#include "hw/boards.h"
static void machine_none_init(QEMUMachineInitArgs *args)
{
}
static QEMUMachine machine_none = {
.name = "none",
.desc = "empty machine",
.init = machine_none_init,
.max_cpus = 0,
};
static void register_machines(void)
{
qemu_register_machine(&machine_none);
}
machine_init(register_machines);