diff options
author | Justin L Werner <justin.werner@caononical.com> | 2012-08-09 14:20:30 -0600 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-08-16 11:20:08 -0600 |
commit | 502afac1e0f8e509ecce1260375e987d04dd0a5f (patch) | |
tree | d7fec93c242dc1db1e6d33a0ada2c9e2155a8f60 /common/main.c | |
parent | 3f0ff412b6be56f90ad96724872f79e371c66c28 (diff) |
PXE: add dhcp option support for better pxe support
"MAGIC" - 208 - An option whose presence and content verifies to
the PXELINUX bootloader that the options numbered 209-211 are for
the purpose as described herein.
"ConfigFile" - 209 - Configures the path/filename component of the
configuration file's location, which this bootloader should use to
configure itself.
"PathPrefix" - 210 - Configures a value to be prepended to the
ConfigFile to discern the directory location of the file.
"RebootTime" - 211 - Configures a timeout after which the
bootstrap program will reboot the system (most likely returning it
to PXE).
Signed-off-by: Justin L Werner <justin.werner@caononical.com>
Signed-off-by: John Rigby <john.rigby@linaro.org>
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c index a93335798..00463bb07 100644 --- a/common/main.c +++ b/common/main.c @@ -43,6 +43,10 @@ #include <linux/ctype.h> #include <menu.h> +#if defined(CONFIG_BOOTP_VENDOREX) && defined(CONFIG_BOOTP_VENDOREX_PXE_SHARED) +#include "../net/magic.h" +#endif + #if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) DECLARE_GLOBAL_DATA_PTR; #endif @@ -470,6 +474,13 @@ void init_cmd_timeout(void) */ void reset_cmd_timeout(void) { +#if defined(CONFIG_BOOTP_VENDOREX) && defined(CONFIG_BOOTP_VENDOREX_PXE_SHARED) + char *pxe_reboot_time = getenv(PXE_REBOOT_TIME); + + if (pxe_reboot_time && *pxe_reboot_time) { + retry_time = atoi(pxe_reboot_time); + } +#endif endtime = endtick(retry_time); } #endif |