qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com
Subject: [Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace
Date: Wed,  9 Dec 2009 17:07:50 +0100	[thread overview]
Message-ID: <1260374873-29783-1-git-send-email-armbru@redhat.com> (raw)

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

             reply	other threads:[~2009-12-09 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 16:07 Markus Armbruster [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260374873-29783-1-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).