From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [FOR 0.12 PATCH] qdev: Replace device names containing whitespace
Date: Wed, 09 Dec 2009 09:09:25 +0100 [thread overview]
Message-ID: <m34oo01scq.fsf@crossbow.pond.sub.org> (raw)
In-Reply-To: <4B1F545E.9090809@redhat.com> (Gerd Hoffmann's message of "Wed, 09 Dec 2009 08:40:14 +0100")
Gerd Hoffmann <kraxel@redhat.com> writes:
>> diff --git a/hw/usb-msd.c b/hw/usb-msd.c
>> index bb39b62..dec35bc 100644
>> --- a/hw/usb-msd.c
>> +++ b/hw/usb-msd.c
>> @@ -591,7 +591,7 @@ static USBDevice *usb_msd_init(const char *filename)
>> }
>>
>> /* create guest device */
>> - dev = usb_create(NULL /* FIXME */, "QEMU USB MSD");
>> + dev = usb_create(NULL /* FIXME */, "usb-storage");
>> qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
>> if (qdev_init(&dev->qdev)< 0)
>> return NULL;
>> @@ -600,8 +600,7 @@ static USBDevice *usb_msd_init(const char *filename)
>> }
>>
>> static struct USBDeviceInfo msd_info = {
>> - .qdev.name = "QEMU USB MSD",
>> - .qdev.alias = "usb-storage",
>> + .qdev.name = "usb-storage",
>> .qdev.size = sizeof(MSDState),
>> .init = usb_msd_initfn,
>> .handle_packet = usb_generic_handle_packet,
>
> No. USB needs some more care. DeviceInfo->name is also used as
> default value for USBDevice->devname. See usb_qdev_init(). Most usb
> backends don't change it. So this change is visible in both 'info
> usb' monitor command and within the guest (check
> /proc/bus/usb/devices).
>
> I'd suggest to add a new field to USBDeviceInfo, stick the long name
> there and use that in usb_qdev_init() then.
I missed that needle in the "grep -w name" haystack.
> Otherwise the patch looks fine to me.
Will fix. Thanks!
next prev parent reply other threads:[~2009-12-09 8:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 20:45 [Qemu-devel] [FOR 0.12 PATCH] qdev: Replace device names containing whitespace Markus Armbruster
2009-12-09 7:40 ` [Qemu-devel] " Gerd Hoffmann
2009-12-09 8:09 ` Markus Armbruster [this message]
2009-12-09 9:28 ` [Qemu-devel] " Ian Molton
2009-12-09 9:43 ` Markus Armbruster
2009-12-12 8:58 ` Blue Swirl
2009-12-12 18:04 ` Markus Armbruster
2009-12-13 7:11 ` Blue Swirl
2009-12-14 9:41 ` [FOR 0.12 PATCH] qdev: Improve uni-north device names (was: [Qemu-devel] [FOR 0.12 PATCH] qdev: Replace device names containing whitespace) Markus Armbruster
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=m34oo01scq.fsf@crossbow.pond.sub.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.