diff options
author | Marcel Apfelbaum <marcel@redhat.com> | 2015-01-06 15:29:14 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-01-08 17:32:27 +0000 |
commit | de77a243b3e703adae0a5c981914ff87cb99bdf6 (patch) | |
tree | 14036828408040de38ebefd9035546f96770d46d /vl.c | |
parent | 5e97b623c254a2c7b1f67b21f7aede93d995f4bd (diff) | |
download | hqemu-de77a243b3e703adae0a5c981914ff87cb99bdf6.zip hqemu-de77a243b3e703adae0a5c981914ff87cb99bdf6.tar.gz |
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 <marcel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Message-id: 1420550957-22337-4-git-send-email-marcel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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); } |