From 5607c38820366954c38dd702e979499486057481 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Jun 2009 15:14:08 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/r2d.c') diff --git a/hw/r2d.c b/hw/r2d.c index a529ab4a83..8ce68325c2 100644 --- a/hw/r2d.c +++ b/hw/r2d.c @@ -231,7 +231,7 @@ static void r2d_init(ram_addr_t ram_size, /* NIC: rtl8139 on-board, and 2 slots. */ for (i = 0; i < nb_nics; i++) - pci_nic_init(pci, &nd_table[i], (i==0)? 2<<3: -1, "rtl8139"); + pci_nic_init(&nd_table[i], "rtl8139", i==0 ? "2" : NULL); /* Todo: register on board registers */ if (kernel_filename) { -- cgit v1.2.3