Revert "Fix exit on 'pci_add' Monitor command"
This reverts commit 0148fde54c.
As requested by Luiz.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
			
			
This commit is contained in:
		
							parent
							
								
									0ca9f8a42d
								
							
						
					
					
						commit
						e52eb611db
					
				| 
						 | 
				
			
			@ -46,10 +46,6 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
 | 
			
		|||
        monitor_printf(mon, "Parameter addr not supported\n");
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (nd_table[ret].model && !pci_nic_supported(nd_table[ret].model))
 | 
			
		||||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    return pci_nic_init(&nd_table[ret], "rtl8139", devaddr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								hw/pci.c
								
								
								
								
							
							
						
						
									
										11
									
								
								hw/pci.c
								
								
								
								
							| 
						 | 
				
			
			@ -833,17 +833,6 @@ static const char * const pci_nic_names[] = {
 | 
			
		|||
    NULL
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int pci_nic_supported(const char *model)
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; pci_nic_names[i]; i++)
 | 
			
		||||
        if (strcmp(model, pci_nic_names[i]) == 0)
 | 
			
		||||
            return 1;
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Initialize a PCI NIC.  */
 | 
			
		||||
PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
 | 
			
		||||
                        const char *default_devaddr)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								hw/pci.h
								
								
								
								
							
							
						
						
									
										1
									
								
								hw/pci.h
								
								
								
								
							| 
						 | 
				
			
			@ -253,7 +253,6 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name,
 | 
			
		|||
                         pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
 | 
			
		||||
                         void *irq_opaque, int devfn_min, int nirq);
 | 
			
		||||
 | 
			
		||||
int pci_nic_supported(const char *model);
 | 
			
		||||
PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
 | 
			
		||||
                        const char *default_devaddr);
 | 
			
		||||
PCIDevice *pci_nic_init_nofail(NICInfo *nd, const char *default_model,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue