qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCHv4 08/15] Add get_fw_dev_path callback for pci bu


From: Gleb Natapov
Subject: [Qemu-devel] Re: [PATCHv4 08/15] Add get_fw_dev_path callback for pci bus.
Date: Sun, 14 Nov 2010 20:42:37 +0200

On Sun, Nov 14, 2010 at 08:27:20PM +0200, Michael S. Tsirkin wrote:
> On Sun, Nov 14, 2010 at 05:39:34PM +0200, Gleb Natapov wrote:
> > +static char *pcibus_get_fw_dev_path(DeviceState *dev)
> > +{
> > +    PCIDevice *d = (PCIDevice *)dev;
> > +    char path[50], name[33];
> > +    int off;
> > +
> > +    off = snprintf(path, sizeof(path), "address@hidden",
> > +                   pci_dev_fw_name(dev, name, sizeof name),
> > +                   PCI_SLOT(d->devfn));
> > +    if (PCI_FUNC(d->devfn))
> > +        snprintf(path + off, sizeof(path) + off, ",%x", 
> > PCI_FUNC(d->devfn));
> 
> Can we *always* specify a slot number in the name?
> If yes I think we should, because I think we saw that the short form is
> ambiguous: if there's a device at a slot != 0, openfirmware will
> to match that against the name.
You accidentally something here.

> Right?
> 
I do not see what is ambiguous here. Can you explain?

--
                        Gleb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]