Revision d5286af5 vl.c

b/vl.c
263 263
static NotifierList machine_init_done_notifiers =
264 264
    NOTIFIER_LIST_INITIALIZER(machine_init_done_notifiers);
265 265

  
266
static int tcg_allowed = 1;
267
int kvm_allowed = 0;
268
int xen_allowed = 0;
266
static bool tcg_allowed = true;
267
bool kvm_allowed;
268
bool xen_allowed;
269 269
uint32_t xen_domid;
270 270
enum xen_mode xen_mode = XEN_EMULATE;
271 271
static int tcg_tb_size;
......
2544 2544
    const char *name;
2545 2545
    int (*available)(void);
2546 2546
    int (*init)(void);
2547
    int *allowed;
2547
    bool *allowed;
2548 2548
} accel_list[] = {
2549 2549
    { "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed },
2550 2550
    { "xen", "Xen", xen_available, xen_init, &xen_allowed },
......
2582 2582
                           accel_list[i].name);
2583 2583
                    continue;
2584 2584
                }
2585
                *(accel_list[i].allowed) = 1;
2585
                *(accel_list[i].allowed) = true;
2586 2586
                ret = accel_list[i].init();
2587 2587
                if (ret < 0) {
2588 2588
                    init_failed = true;
2589 2589
                    fprintf(stderr, "failed to initialize %s: %s\n",
2590 2590
                            accel_list[i].name,
2591 2591
                            strerror(-ret));
2592
                    *(accel_list[i].allowed) = 0;
2592
                    *(accel_list[i].allowed) = false;
2593 2593
                } else {
2594 2594
                    accel_initialised = true;
2595 2595
                }

Also available in: Unified diff