qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace
@ 2009-12-09 16:07 Markus Armbruster
  2009-12-09 16:07 ` [Qemu-devel] [FOR 0.12 PATCH v2 1/3] qdev: Rename USBDevice member devname to product_desc Markus Armbruster
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Markus Armbruster @ 2009-12-09 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

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(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-09 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 16:07 [Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace Markus Armbruster
2009-12-09 16:07 ` [Qemu-devel] [FOR 0.12 PATCH v2 1/3] qdev: Rename USBDevice member devname to product_desc Markus Armbruster
2009-12-09 16:07 ` [Qemu-devel] [FOR 0.12 PATCH v2 2/3] qdev: Separate USB product description from qdev name Markus Armbruster
2009-12-09 16:07 ` [Qemu-devel] [FOR 0.12 PATCH v2 3/3] qdev: Replace device names containing whitespace Markus Armbruster
2009-12-09 16:35 ` [Qemu-devel] [FOR 0.12 PATCH v2 0/3] " Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).