From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi6zG-0008Ax-Jv for qemu-devel@nongnu.org; Mon, 31 Aug 2009 09:31:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi6zB-00086d-2Q for qemu-devel@nongnu.org; Mon, 31 Aug 2009 09:31:57 -0400 Received: from [199.232.76.173] (port=57570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi6zA-00086a-JQ for qemu-devel@nongnu.org; Mon, 31 Aug 2009 09:31:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1028) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi6zA-00043M-4B for qemu-devel@nongnu.org; Mon, 31 Aug 2009 09:31:52 -0400 Message-ID: <4A9BD0BE.6040105@redhat.com> Date: Mon, 31 Aug 2009 15:31:42 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1251721445-17824-1-git-send-email-kraxel@redhat.com> <1251721445-17824-5-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 4/9] qdev/usb: make qemu aware of usb busses. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 08/31/09 14:45, Juan Quintela wrote: >> pc-bios/bios.bin | Bin 131072 -> 131072 bytes > > Do you really wanted to include this? Oops, no. Probably committed by mistake via 'git commit -a' >> +static struct { >> + const char *name; >> + const char *qdev; >> +} usbdevs[] = { >> + { >> + .name = "mouse", >> + .qdev = "QEMU USB Mouse", >> + },{ >> + .name = "tablet", >> + .qdev = "QEMU USB Tablet", > We don't want this table here, we want to be able to compile out > table/mouse/disk/... And to get that compiled out, vl.c shouldn't have > any knowled of what goes here. Hmm. That isn't easy to do for the -usbdevice legacy handling ... >> + /* simple devices which don't need extra care */ >> + for (i = 0; i< ARRAY_SIZE(usbdevs); i++) { >> + if (strcmp(devname, usbdevs[i].name) != 0) >> + continue; > > This function should be take care in global function. parse error. --verbose please. > I think we really need a way to pass the extra parameters to > usb_create_simple No. Cases where usb_create_simple() doesn't work are handled via usb_create(); /* set properties here */ qdev_init(); in the -usbdevice legacy path. When creating devices via -device you'll specify the properties directly on the command line instead. Last patch of the series shows this for usb-msd. There are some usb devices which are not yet fully converted, i.e. parameters can't be passed via properties. This needs more work. cheers, Gerd