aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-04-09 20:34:52 +0300
committerAndreas Färber <afaerber@suse.de>2014-05-05 19:08:49 +0200
commitf1e298794daea46e7f52995887c865ac6ada10b9 (patch)
tree0acc7bde4cf0c0fee40299c4b09e3c5552de5d26 /vl.c
parentaaa663916d78aeb51a97842735052e7c8859dc9e (diff)
machine: Replace QEMUMachine by MachineClass in accelerator configuration
This minimizes QEMUMachine usage, as part of machine QOM-ification. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index 2c2b625b37..f423b2e116 100644
--- a/vl.c
+++ b/vl.c
@@ -2725,7 +2725,7 @@ static MachineClass *machine_parse(const char *name)
exit(!name || !is_help_option(name));
}
-static int tcg_init(QEMUMachine *machine)
+static int tcg_init(MachineClass *mc)
{
tcg_exec_init(tcg_tb_size * 1024 * 1024);
return 0;
@@ -2735,7 +2735,7 @@ static struct {
const char *opt_name;
const char *name;
int (*available)(void);
- int (*init)(QEMUMachine *);
+ int (*init)(MachineClass *mc);
bool *allowed;
} accel_list[] = {
{ "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed },
@@ -2744,7 +2744,7 @@ static struct {
{ "qtest", "QTest", qtest_available, qtest_init_accel, &qtest_allowed },
};
-static int configure_accelerator(QEMUMachine *machine)
+static int configure_accelerator(MachineClass *mc)
{
const char *p;
char buf[10];
@@ -2771,7 +2771,7 @@ static int configure_accelerator(QEMUMachine *machine)
break;
}
*(accel_list[i].allowed) = true;
- ret = accel_list[i].init(machine);
+ ret = accel_list[i].init(mc);
if (ret < 0) {
init_failed = true;
fprintf(stderr, "failed to initialize %s: %s\n",
@@ -4222,7 +4222,7 @@ int main(int argc, char **argv, char **envp)
exit(0);
}
- configure_accelerator(machine);
+ configure_accelerator(machine_class);
if (qtest_chrdev) {
Error *local_err = NULL;