Improve pci host device address parsing
commitc13df76703ed1fb63c2ddba0a5de51b8a6fce4bf
authorHan, Weidong <weidong.han@intel.com>
Mon, 30 Mar 2009 12:41:47 +0000 (30 20:41 +0800)
committerAvi Kivity <avi@redhat.com>
Wed, 1 Apr 2009 09:18:31 +0000 (1 12:18 +0300)
treefa7da026705e1e4cf4e5e7e48e392fec4858ab8c
parentf4ddaf988c5dddd98e9abe26dd0f3615596c604b
Improve pci host device address parsing

pci_parse_devaddr parses [[<domain>:][<bus>:]<slot>, it's valid when even
enter only slot, whereas it must be bus:slot.func in device assignment
command  (-pcidevice host=bus:slot.func). So I implemented a dedicated
function to parse device bdf in device assignment command, rather than
mix two parsing function together.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/device-assignment.c
hw/pci.c
hw/pci.h