pci: typo in pcibus_get_dev_path()

This patch fixes typo in pcibus_get_dev_path().
Without this patch, the result of pcibus_get_dev_path() isn't unique.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Isaku Yamahata 2011-01-27 12:49:04 +09:00 committed by Michael S. Tsirkin
parent bb34007e86
commit 4c90051801
1 changed files with 1 additions and 1 deletions

View File

@ -2072,7 +2072,7 @@ static char *pcibus_get_dev_path(DeviceState *dev)
for (t = d; t; t = t->bus->parent_dev) {
p -= slot_len;
s = snprintf(slot, sizeof slot, ":%02x.%x",
PCI_SLOT(t->devfn), PCI_FUNC(d->devfn));
PCI_SLOT(t->devfn), PCI_FUNC(t->devfn));
assert(s == slot_len);
memcpy(p, slot, slot_len);
}