From 4d4545743f55b37d37535f7b32456b82c97efeb8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 26 Nov 2012 16:03:42 +0100 Subject: qemu-option: move standard option definitions out of qemu-config.c Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'hw') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index b739867..93283ee 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -615,3 +615,54 @@ void qdev_machine_init(void) qdev_get_peripheral_anon(); qdev_get_peripheral(); } + +QemuOptsList qemu_device_opts = { + .name = "device", + .implied_opt_name = "driver", + .head = QTAILQ_HEAD_INITIALIZER(qemu_device_opts.head), + .desc = { + /* + * no elements => accept any + * sanity checking will happen later + * when setting device properties + */ + { /* end of list */ } + }, +}; + +QemuOptsList qemu_global_opts = { + .name = "global", + .head = QTAILQ_HEAD_INITIALIZER(qemu_global_opts.head), + .desc = { + { + .name = "driver", + .type = QEMU_OPT_STRING, + },{ + .name = "property", + .type = QEMU_OPT_STRING, + },{ + .name = "value", + .type = QEMU_OPT_STRING, + }, + { /* end of list */ } + }, +}; + +int qemu_global_option(const char *str) +{ + char driver[64], property[64]; + QemuOpts *opts; + int rc, offset; + + rc = sscanf(str, "%63[^.].%63[^=]%n", driver, property, &offset); + if (rc < 2 || str[offset] != '=') { + error_report("can't parse: \"%s\"", str); + return -1; + } + + opts = qemu_opts_create_nofail(&qemu_global_opts); + qemu_opt_set(opts, "driver", driver); + qemu_opt_set(opts, "property", property); + qemu_opt_set(opts, "value", str+offset+1); + return 0; +} -- cgit v1.1 From afd347ab3874858bfb609f22032c34ecd5f37d08 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 20 Dec 2012 20:39:36 +0100 Subject: build: remove CONFIG_SMARTCARD The passthru smartcard does not have the shared library dependency, build it unconditionally. Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 2 +- hw/usb/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/Makefile.objs b/hw/Makefile.objs index d867184..6fdd25e 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -37,7 +37,7 @@ common-obj-$(CONFIG_DMA) += dma.o common-obj-$(CONFIG_I82374) += i82374.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_APPLESMC) += applesmc.o -common-obj-$(CONFIG_SMARTCARD) += ccid-card-passthru.o +common-obj-y += ccid-card-passthru.o common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o common-obj-y += fifo.o diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index dad4cb9..d1bbbc0 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -4,11 +4,11 @@ common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o hcd-ehci-pci.o hcd-ehci-sysbus.o common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o common-obj-y += libhw.o -common-obj-$(CONFIG_SMARTCARD) += dev-smartcard-reader.o common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o common-obj-y += core.o combined-packet.o bus.o desc.o dev-hub.o common-obj-y += host-$(HOST_USB).o dev-bluetooth.o common-obj-y += dev-hid.o dev-storage.o dev-wacom.o common-obj-y += dev-serial.o dev-network.o dev-audio.o +common-obj-y += dev-smartcard-reader.o common-obj-y += dev-uas.o -- cgit v1.1 From 9444e9e640d56039253d885ba88c3fa818a00149 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 20 Dec 2012 15:24:49 +0100 Subject: build: consolidate multiple variables into universal-obj-y The directory descent mechanism, and a less-flat tree both helped in making some *-obj-y definitions very short. Many of these often end up in universal-obj-y, and used to be separate only because of libuser (which is now part of history...). Consolidate these variables in a single one. Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw') diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 6fdd25e..aa55ce9 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -1,8 +1,7 @@ # core qdev-related obj files, also used by *-user: -hw-core-obj-y += qdev.o qdev-properties.o +universal-obj-y += qdev.o qdev-properties.o # irq.o needed for qdev GPIO handling: -hw-core-obj-y += irq.o - +universal-obj-y += irq.o common-obj-y = usb/ ide/ pci/ common-obj-y += loader.o -- cgit v1.1