summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2012-03-29 01:05:22 +0200
committerMichael Brown2012-03-29 15:02:02 +0200
commit3425726cf33c2af84c9737a2501cd39517e42cdb (patch)
treeb08cd61419fad6e16de7e9329d91540e99a6a980 /src/include/ipxe
parent[menu] Add menu user interface (diff)
downloadipxe-3425726cf33c2af84c9737a2501cd39517e42cdb.tar.gz
ipxe-3425726cf33c2af84c9737a2501cd39517e42cdb.tar.xz
ipxe-3425726cf33c2af84c9737a2501cd39517e42cdb.zip
[menu] Add menu commands
Allow iPXE scripts to create menus. For example: #!ipxe menu iSCSI boot demonstration item install Install Fedora to ${root-path} item --default boot Boot from ${root-path} item shell Enter iPXE shell item exit Exit to BIOS choose label && goto ${label} :boot sanboot ${root-path} :install sanhook ${root-path} chain http://${next-server}/fedora.ipxe :shell shell :exit Inspired-by: Robin Smidsrød <robin@smidsrod.no> Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/errfile.h1
-rw-r--r--src/include/ipxe/features.h1
-rw-r--r--src/include/ipxe/parseopt.h2
3 files changed, 4 insertions, 0 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index c72aeb7b..77c2f809 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -252,6 +252,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define ERRFILE_cms ( ERRFILE_OTHER | 0x002a0000 )
#define ERRFILE_imgtrust ( ERRFILE_OTHER | 0x002b0000 )
#define ERRFILE_menu_ui ( ERRFILE_OTHER | 0x002c0000 )
+#define ERRFILE_menu_cmd ( ERRFILE_OTHER | 0x002d0000 )
/** @} */
diff --git a/src/include/ipxe/features.h b/src/include/ipxe/features.h
index 660015cd..498ec944 100644
--- a/src/include/ipxe/features.h
+++ b/src/include/ipxe/features.h
@@ -52,6 +52,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define DHCP_EB_FEATURE_EFI 0x24 /**< EFI format */
#define DHCP_EB_FEATURE_FCOE 0x25 /**< FCoE protocol */
#define DHCP_EB_FEATURE_VLAN 0x26 /**< VLAN support */
+#define DHCP_EB_FEATURE_MENU 0x27 /**< Menu support */
/** @} */
diff --git a/src/include/ipxe/parseopt.h b/src/include/ipxe/parseopt.h
index b5fd2203..b492a51e 100644
--- a/src/include/ipxe/parseopt.h
+++ b/src/include/ipxe/parseopt.h
@@ -13,6 +13,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stddef.h>
struct net_device;
+struct menu;
/** A command-line option descriptor */
struct option_descriptor {
@@ -116,6 +117,7 @@ struct command_descriptor {
extern int parse_string ( const char *text, const char **value );
extern int parse_integer ( const char *text, unsigned int *value );
extern int parse_netdev ( const char *text, struct net_device **netdev );
+extern int parse_menu ( const char *text, struct menu **menu );
extern int parse_flag ( const char *text __unused, int *flag );
extern int parse_key ( const char *text, unsigned int *key );
extern void print_usage ( struct command_descriptor *cmd, char **argv );