[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whi
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace |
Date: |
Wed, 9 Dec 2009 17:07:50 +0100 |
Device names with whitespace require quoting in the shell and in the
monitor. Some of the offenders are also overly long. Some have a
more convenient alias, some don't.
The place for verbose device names is DeviceInfo member desc. The
name should be short & sweet.
This patch gets rid of the spaces. It normalizes names it touches to
lower case with '-' separators. This seems to be the most common
style. If you want me to normalize all device names, I can do that.
On naming style: we have 187 device names. 41 of them use upper
case. 40 use '-' as separator, 39 use '_', 19 use ',', and 30 use
space. 10 of them use two different separators simultaneously.
I checked every use of DeviceInfo members name and alias to find places
that use it for purposes other than naming qdevs. They are:
* Some NIC initialization functions pass the qdev name to
qemu_new_nic() parameter model. It ends up in VLANClientState
member model. I believe changing that from long description to
short name is an improvement. None of the devices using
qemu_new_nic() that way get their names changed here.
* usb_qdev_init() copies the qdev name to USBDevice devname. Gets
overwritten for usb-host devices, but not for the others. This is
what Gerd pointed out. I fixed it just like Gerd recommended.
Markus Armbruster (3):
qdev: Rename USBDevice member devname to product_desc
qdev: Separate USB product description from qdev name
qdev: Replace device names containing whitespace
hw/bt-hid.c | 4 ++--
hw/cirrus_vga.c | 5 +++--
hw/grackle_pci.c | 4 ++--
hw/ide/cmd646.c | 4 ++--
hw/ide/piix.c | 8 ++++----
hw/unin_pci.c | 30 +++++++++++++++---------------
hw/usb-bt.c | 5 +++--
hw/usb-bus.c | 13 +++++++------
hw/usb-hid.c | 14 +++++++-------
hw/usb-hub.c | 3 ++-
hw/usb-msd.c | 6 +++---
hw/usb-net.c | 5 +++--
hw/usb-ohci.c | 5 ++---
hw/usb-serial.c | 12 ++++++------
hw/usb-uhci.c | 8 ++++----
hw/usb-wacom.c | 5 +++--
hw/usb.h | 4 +++-
hw/vmware_vga.c | 4 ++--
usb-bsd.c | 9 +++++----
usb-linux.c | 10 +++++-----
20 files changed, 83 insertions(+), 75 deletions(-)
- [Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace,
Markus Armbruster <=