qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Should new USB devices such as usb-ccid support legacy


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Should new USB devices such as usb-ccid support legacy -usbdevice?
Date: Mon, 16 May 2011 10:01:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10

On 05/13/11 18:47, Anthony Liguori wrote:
On 05/13/2011 11:36 AM, Markus Armbruster wrote:
When Gerd qdevified USB, he kept legacy -usbdevice working (commit
0958b4cc...). What about new USB devices? Should they get a legacy
syntax, too?

Any reason to do that? We already have a number of devices which can be setup via -device only, and that is perfectly fine IMHO. Also I don't want extend the legacy syntax when adding new properties for new features to usb devices, which will add more cases where you have to use -device to use new features.

The only existing new device is usb-ccid, and it got one in commit
36707144.

What keeps -usbdevice from being a light wrapper to -device such that no
future code is needed for this?

Different command line syntax. Each device (which needs/accepts parameters) has a init function to handle the -usbdevice command line, which basically does:

  * parse old syntax
  * usb_create()
  * qdev_set_prop_*() calls
  * qdev_init

I know some of the names are different but presumably we could use a map
for existing ones and pass through names for newer ones.

Just the device name is easy, there is a field in USBDeviceInfo for that already, and in fact "-usbdevice tablet" acts like "-device usb-tablet" thanks to that entry ;)

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]