[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:
Michael Brown
2012-07-11 18:16:13 +01:00
parent 9e5152e095
commit a814eff38e
4 changed files with 69 additions and 0 deletions

View File

@@ -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();