Attempt to restore the network device to the state it was in prior to
calling the NBP. This simplifies the task of taking follow-up action
in an iPXE script.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
image );
return -ENODEV;
}
+ netdev_get ( netdev );
/* Activate PXE */
pxe_activate ( netdev );
/* Deactivate PXE */
pxe_deactivate();
+ /* Try to reopen network device. Ignore errors, since the NBP
+ * may have called PXENV_STOP_UNDI.
+ */
+ netdev_open ( netdev );
+ netdev_put ( netdev );
+
return rc;
}