mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +03:00
[interface] Provide intf_reinit() to reinitialise nullified interfaces
Provide an abstraction intf_reinit() to restore the descriptor of a previously nullified interface. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -295,7 +295,6 @@ void intf_shutdown ( struct interface *intf, int rc ) {
|
||||
* blocked during shutdown.
|
||||
*/
|
||||
void intf_restart ( struct interface *intf, int rc ) {
|
||||
struct interface_descriptor *desc = intf->desc;
|
||||
|
||||
/* Shut down the interface */
|
||||
intf_shutdown ( intf, rc );
|
||||
@@ -309,7 +308,7 @@ void intf_restart ( struct interface *intf, int rc ) {
|
||||
* infinite loop as the intf_close() operations on each side
|
||||
* of the link call each other recursively.
|
||||
*/
|
||||
intf->desc = desc;
|
||||
intf_reinit ( intf );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user