From de77a243b3e703adae0a5c981914ff87cb99bdf6 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Tue, 6 Jan 2015 15:29:14 +0200 Subject: hw/usb: simplified usb_enabled The argument is not longer used and the implementation uses now QOM instead of QemuOpts. Signed-off-by: Marcel Apfelbaum Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Alexander Graf Message-id: 1420550957-22337-4-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell --- vl.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 415535fb46..7786b2f921 100644 --- a/vl.c +++ b/vl.c @@ -1002,10 +1002,9 @@ bool defaults_enabled(void) return has_defaults; } -bool usb_enabled(bool default_usb) +bool usb_enabled(void) { - return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", - default_usb); + return machine_usb(current_machine); } #ifndef _WIN32 @@ -1229,7 +1228,7 @@ static int usb_device_add(const char *devname) const char *p; #endif - if (!usb_enabled(false)) { + if (!usb_enabled()) { return -1; } @@ -1261,7 +1260,7 @@ static int usb_device_del(const char *devname) return -1; } - if (!usb_enabled(false)) { + if (!usb_enabled()) { return -1; } @@ -4230,7 +4229,7 @@ int main(int argc, char **argv, char **envp) set_numa_modes(); /* init USB devices */ - if (usb_enabled(false)) { + if (usb_enabled()) { if (foreach_device_config(DEV_USB, usb_parse) < 0) exit(1); } -- cgit v1.2.3