QemuOpts: switch over -device.

Make -device switch use the QemuOpts framework.
Everything should continue to work like it did before.

New: "-set device.$id.$property=$value" works.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id: 
diff --git a/qemu-config.c b/qemu-config.c
index bcfb6eb..3dd473a 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -71,8 +71,22 @@
     },
 };
 
+QemuOptsList qemu_device_opts = {
+    .name = "device",
+    .head = TAILQ_HEAD_INITIALIZER(qemu_device_opts.head),
+    .desc = {
+        /*
+         * no elements => accept any
+         * sanity checking will happen later
+         * when setting device properties
+         */
+        { /* end if list */ }
+    },
+};
+
 static QemuOptsList *lists[] = {
     &qemu_drive_opts,
+    &qemu_device_opts,
     NULL,
 };