From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud1QW-0000iY-T6 for qemu-devel@nongnu.org; Thu, 16 May 2013 12:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ud1QV-0006nn-JR for qemu-devel@nongnu.org; Thu, 16 May 2013 12:53:12 -0400 Received: from mail-gg0-x22f.google.com ([2607:f8b0:4002:c02::22f]:33961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud1QV-0006nj-Em for qemu-devel@nongnu.org; Thu, 16 May 2013 12:53:11 -0400 Received: by mail-gg0-f175.google.com with SMTP id k6so648908ggd.20 for ; Thu, 16 May 2013 09:53:10 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51950EEB.5010702@redhat.com> Date: Thu, 16 May 2013 18:52:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368662027-14213-1-git-send-email-aliguori@us.ibm.com> <20130516142151.GC23880@vm> <5194F279.30200@redhat.com> <51950139.5000209@greensocs.com> <51950430.9030107@redhat.com> <51950A81.8050703@greensocs.com> In-Reply-To: <51950A81.8050703@greensocs.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [ANNOUNCE] QEMU 1.5.0-rc2 is now available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= Cc: Anthony Liguori , mdroth , qemu-devel@nongnu.org Il 16/05/2013 18:34, KONRAD Frédéric ha scritto: > True, I avoided it because of CCW and S390, but as they don't have there > get_dev_path, it seems > not to change anything for them. > > I think that's better and I get 0000:00:04.0/virtio-net for idstr. Thanks, Reviewed-by: Paolo Bonzini Paolo > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index aab72ff..ea2e11a 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -154,12 +154,26 @@ void virtio_bus_set_vdev_config(VirtioBusState > *bus, uint8_t *config) > } > } > > +static char *virtio_bus_get_dev_path(DeviceState *dev) > +{ > + BusState *bus = qdev_get_parent_bus(dev); > + DeviceState *proxy = DEVICE(bus->parent); > + return qdev_get_dev_path(proxy); > +} > + > +static void virtio_bus_class_init(ObjectClass *klass, void *data) > +{ > + BusClass *bus_class = BUS_CLASS(klass); > + bus_class->get_dev_path = virtio_bus_get_dev_path; > +} > + > static const TypeInfo virtio_bus_info = { > .name = TYPE_VIRTIO_BUS, > .parent = TYPE_BUS, > .instance_size = sizeof(VirtioBusState), > .abstract = true, > .class_size = sizeof(VirtioBusClass), > + .class_init = virtio_bus_class_init > }; > > static void virtio_register_types(void)