Peter Maydell <peter.mayd...@linaro.org> writes: > On 4 January 2018 at 15:47, Paolo Bonzini <pbonz...@redhat.com> 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.