From: Gerd Hoffmann <kraxel@redhat.com>
To: Markus Armbruster <armbru@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 08:40:14 +0100 [thread overview]
Message-ID: <4B1F545E.9090809@redhat.com> (raw)
In-Reply-To: <m3my1t2o00.fsf@crossbow.pond.sub.org>
> 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.
Otherwise the patch looks fine to me.
cheers,
Gerd
next prev parent reply other threads:[~2009-12-09 7:40 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 ` Gerd Hoffmann [this message]
2009-12-09 8:09 ` [Qemu-devel] " Markus Armbruster
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=4B1F545E.9090809@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@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.