mirror of
https://github.com/ipxe/ipxe
synced 2026-01-13 17:43:49 +03:00
[pxe] Add PXENV_FILE_CMDLINE API call
Allow a PXE NBP to obtain its command line (if any) via the new PXE API call PXENV_FILE_CMDLINE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -35,6 +35,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
FEATURE ( FEATURE_IMAGE, "PXE", DHCP_EB_FEATURE_PXE, 1 );
|
||||
|
||||
/** PXE command line */
|
||||
const char *pxe_cmdline;
|
||||
|
||||
/**
|
||||
* Execute PXE image
|
||||
*
|
||||
@@ -66,9 +69,15 @@ static int pxe_exec ( struct image *image ) {
|
||||
/* Activate PXE */
|
||||
pxe_activate ( netdev );
|
||||
|
||||
/* Set PXE command line */
|
||||
pxe_cmdline = image->cmdline;
|
||||
|
||||
/* Start PXE NBP */
|
||||
rc = pxe_start_nbp();
|
||||
|
||||
/* Clear PXE command line */
|
||||
pxe_cmdline = NULL;
|
||||
|
||||
/* Deactivate PXE */
|
||||
pxe_deactivate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user