Fixed parameter cleanup after adding "multiple NICs" support.

This commit is contained in:
Volker Ruppert 2020-07-23 21:35:27 +00:00
parent 267340ba73
commit b00873c909
2 changed files with 14 additions and 3 deletions

View File

@ -378,9 +378,14 @@ int CDECL libe1000_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
void CDECL libe1000_LTX_plugin_fini(void)
{
char name[12];
SIM->unregister_addon_option("e1000");
bx_list_c *menu = (bx_list_c*)SIM->get_param("network");
menu->remove("e1000");
bx_list_c *network = (bx_list_c*)SIM->get_param("network");
for (Bit8u card = 0; card < BX_E1000_MAX_DEVS; card++) {
sprintf(name, "e1000_%d", card);
network->remove(name);
}
delete E1000DevMain;
}

View File

@ -202,8 +202,14 @@ int CDECL libne2k_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
void CDECL libne2k_LTX_plugin_fini(void)
{
char name[12];
SIM->unregister_addon_option("ne2k");
((bx_list_c*)SIM->get_param("network"))->remove("ne2k");
bx_list_c *network = (bx_list_c*)SIM->get_param("network");
for (Bit8u card = 0; card < BX_NE2K_MAX_DEVS; card++) {
sprintf(name, "ne2k%d", card);
network->remove(name);
}
delete NE2kDevMain;
}