mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 19:38:37 +03:00
[pxe] Create pxe_[de]activate() wrapper functions
Merge the pxe_set_netdev()+pxe_[un]hook_int1a() pattern into a single pxe_[de]activate() call.
This commit is contained in:
@@ -296,11 +296,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
|
||||
}
|
||||
DBG ( " using netdev %s", netdev->name );
|
||||
|
||||
/* Save as PXE net device */
|
||||
pxe_set_netdev ( netdev );
|
||||
|
||||
/* Hook INT 1A */
|
||||
pxe_hook_int1a();
|
||||
/* Activate PXE */
|
||||
pxe_activate ( netdev );
|
||||
|
||||
start_undi->Status = PXENV_STATUS_SUCCESS;
|
||||
return PXENV_EXIT_SUCCESS;
|
||||
@@ -313,11 +310,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
|
||||
PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
|
||||
DBG ( "PXENV_STOP_UNDI" );
|
||||
|
||||
/* Unhook INT 1A */
|
||||
pxe_unhook_int1a();
|
||||
|
||||
/* Clear PXE net device */
|
||||
pxe_set_netdev ( NULL );
|
||||
/* Deactivate PXE */
|
||||
pxe_deactivate();
|
||||
|
||||
/* Prepare for unload */
|
||||
shutdown ( SHUTDOWN_BOOT );
|
||||
|
||||
Reference in New Issue
Block a user