Revision 2ff3de68 vl.c
b/vl.c | ||
---|---|---|
1036 | 1036 |
return 0; |
1037 | 1037 |
} |
1038 | 1038 |
|
1039 |
/*********QEMU USB setting******/ |
|
1040 | 1039 |
bool usb_enabled(bool default_usb) |
1041 | 1040 |
{ |
1042 |
QemuOpts *mach_opts; |
|
1043 |
mach_opts = qemu_opts_find(qemu_find_opts("machine"), 0); |
|
1044 |
if (mach_opts) { |
|
1045 |
return qemu_opt_get_bool(mach_opts, "usb", default_usb); |
|
1046 |
} |
|
1047 |
return default_usb; |
|
1041 |
return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", default_usb); |
|
1048 | 1042 |
} |
1049 | 1043 |
|
1050 | 1044 |
#ifndef _WIN32 |
... | ... | |
4095 | 4089 |
qtest_init(); |
4096 | 4090 |
} |
4097 | 4091 |
|
4098 |
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); |
|
4099 |
if (machine_opts) { |
|
4100 |
kernel_filename = qemu_opt_get(machine_opts, "kernel"); |
|
4101 |
initrd_filename = qemu_opt_get(machine_opts, "initrd"); |
|
4102 |
kernel_cmdline = qemu_opt_get(machine_opts, "append"); |
|
4103 |
} else { |
|
4104 |
kernel_filename = initrd_filename = kernel_cmdline = NULL; |
|
4105 |
} |
|
4092 |
machine_opts = qemu_get_machine_opts(); |
|
4093 |
kernel_filename = qemu_opt_get(machine_opts, "kernel"); |
|
4094 |
initrd_filename = qemu_opt_get(machine_opts, "initrd"); |
|
4095 |
kernel_cmdline = qemu_opt_get(machine_opts, "append"); |
|
4106 | 4096 |
|
4107 | 4097 |
if (!boot_order) { |
4108 | 4098 |
boot_order = machine->boot_order; |
... | ... | |
4145 | 4135 |
exit(1); |
4146 | 4136 |
} |
4147 | 4137 |
|
4148 |
if (!linux_boot && machine_opts && qemu_opt_get(machine_opts, "dtb")) {
|
|
4138 |
if (!linux_boot && qemu_opt_get(machine_opts, "dtb")) { |
|
4149 | 4139 |
fprintf(stderr, "-dtb only allowed with -kernel option\n"); |
4150 | 4140 |
exit(1); |
4151 | 4141 |
} |
Also available in: Unified diff