diff options
author | liguang <lig.fnst@cn.fujitsu.com> | 2013-01-24 13:03:27 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 15:08:02 -0600 |
commit | d5286af5ef27bfe25aa0472eb4d695964ae16b23 (patch) | |
tree | 60229b388420176533d4f46c78df2e9625ec696c /vl.c | |
parent | 217e21be6e0f2c1caa0b644f56aa60dba7ea7893 (diff) |
accel: change {xen, kvm, tcg, qtest}_allowed from int to bool
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -263,9 +263,9 @@ static NotifierList exit_notifiers = static NotifierList machine_init_done_notifiers = NOTIFIER_LIST_INITIALIZER(machine_init_done_notifiers); -static int tcg_allowed = 1; -int kvm_allowed = 0; -int xen_allowed = 0; +static bool tcg_allowed = true; +bool kvm_allowed; +bool xen_allowed; uint32_t xen_domid; enum xen_mode xen_mode = XEN_EMULATE; static int tcg_tb_size; @@ -2544,7 +2544,7 @@ static struct { const char *name; int (*available)(void); int (*init)(void); - int *allowed; + bool *allowed; } accel_list[] = { { "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed }, { "xen", "Xen", xen_available, xen_init, &xen_allowed }, @@ -2582,14 +2582,14 @@ static int configure_accelerator(void) accel_list[i].name); continue; } - *(accel_list[i].allowed) = 1; + *(accel_list[i].allowed) = true; ret = accel_list[i].init(); if (ret < 0) { init_failed = true; fprintf(stderr, "failed to initialize %s: %s\n", accel_list[i].name, strerror(-ret)); - *(accel_list[i].allowed) = 0; + *(accel_list[i].allowed) = false; } else { accel_initialised = true; } |