From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIP5M-00041h-6U for qemu-devel@nongnu.org; Wed, 09 Dec 2009 11:08:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIP5H-0003xG-Ct for qemu-devel@nongnu.org; Wed, 09 Dec 2009 11:08:15 -0500 Received: from [199.232.76.173] (port=45926 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIP5H-0003wz-0q for qemu-devel@nongnu.org; Wed, 09 Dec 2009 11:08:11 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:41586) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIP5G-0003Pn-CD for qemu-devel@nongnu.org; Wed, 09 Dec 2009 11:08:10 -0500 Received: from crossbow.pond.sub.org (pD9E38EAD.dip.t-dialin.net [217.227.142.173]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 34D2C276D54 for ; Wed, 9 Dec 2009 17:08:09 +0100 (CET) From: Markus Armbruster Date: Wed, 9 Dec 2009 17:07:50 +0100 Message-Id: <1260374873-29783-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [FOR 0.12 PATCH v2 0/3] Replace device names containing whitespace List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com 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(-)