qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option
Date: Fri, 05 Jan 2018 09:24:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 4 January 2018 at 15:47, Paolo Bonzini <address@hidden> wrote:
>> The point of deprecation is not to make the interface simpler, it is to
>> avoid cases where one option is doing too much and/or crossing
>> abstraction boundaries, for example -net creating both a device and a
>> hub port.
>>
>> "-serial" is okay because it only creates the front-end, it's the board
>> that decides how to attach it to the back-end.
>>
>> -usbdevice creating both a front-end and a back-end is not a problem per
>> se.  The issue with -usbdevice is just that it's too much code.
>>
>> However, adding magic to "-device usb-braille" that creates both a
>> front-end and a back-end is completely the opposite of sane...
>
> Agreed with this.
>
> Is there any mileage in considering the idea of a generic bit
> in the option-parsing code that has a table of mappings from
> legacy-style-simple-option to complex-set-of-device-etc options,
> so we can retain userfriendliness without per-kind-of-thing
> special casing, or is that too simplistic to work ?

The idea is great, and I wish all syntactic sugar would get expanded
that way.  However, a static table won't work when the expansion depends
on other settings, such as the machine type.  Extra fun when an
expansion exists only for some machine types, say the ones where the
devices to be created are qdevified.



reply via email to

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