diff options
author | Markus Armbruster <armbru@redhat.com> | 2009-06-18 15:14:08 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-22 10:15:29 -0500 |
commit | 5607c38820366954c38dd702e979499486057481 (patch) | |
tree | 9d7f6624fc7b24c6eb887d4b634f57cb6f2b33f1 /hw/pci.h | |
parent | 07b7d05377a5e2b242ef0cce3d461d3284700fc0 (diff) |
Support addr=... in option argument of -net nic
Make net_client_init() accept addr=, put the value into struct
NICinfo. Use it in pci_nic_init(), and remove arguments bus and
devfn.
Don't support addr= in third argument of monitor command pci_add,
because that clashes with its first argument. Admittedly unelegant.
Machines "malta" and "r2d" have a default NIC with a well-known PCI
address. Deal with that the same way as the NIC model: make
pci_nic_init() take an optional default to be used when the user
doesn't specify one.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r-- | hw/pci.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -183,8 +183,8 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, qemu_irq *pic, int devfn_min, int nirq); -PCIDevice *pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn, - const char *default_model); +PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model, + const char *default_devaddr); void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len); uint32_t pci_data_read(void *opaque, uint32_t addr, int len); int pci_bus_num(PCIBus *s); |