mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Add USB option in machine options
When -usb option is used, global varible usb_enabled is set. And all the plaform will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB option in machine options. All the plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
59de4f98d1
commit
094b287f0b
12 changed files with 48 additions and 28 deletions
4
sysemu.h
4
sysemu.h
|
@ -116,7 +116,6 @@ extern const char *keyboard_layout;
|
|||
extern int win2k_install_hack;
|
||||
extern int alt_grab;
|
||||
extern int ctrl_grab;
|
||||
extern int usb_enabled;
|
||||
extern int smp_cpus;
|
||||
extern int max_cpus;
|
||||
extern int cursor_hide;
|
||||
|
@ -186,4 +185,7 @@ void register_devices(void);
|
|||
void add_boot_device_path(int32_t bootindex, DeviceState *dev,
|
||||
const char *suffix);
|
||||
char *get_boot_devices_list(uint32_t *size);
|
||||
|
||||
bool usb_enabled(bool default_usb);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue