summaryrefslogtreecommitdiff
path: root/include/pxe_utils.h
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-10-15 09:18:04 -0600
committerTom Rini <[email protected]>2024-10-15 11:38:44 -0600
commit4378732d5658accd07d2fb245417262a23f578ce (patch)
tree06b50e26d4b1582fb4c00393e83b4ede06537fa6 /include/pxe_utils.h
parent4f777c2ef20ad294af1d3447baf7dfffb7514ab3 (diff)
parent87980311fbb64369c29d8725fc8fb4fb35ae2f3c (diff)
Merge patch series to add a "fallback" keyword to extlinux.conf parsing
This series from Martyn Welch <[email protected]> adds the ability to have a "fallback" option in extlinux.conf parsing, which can be in turn used in A/B style update mechanisms. Link: https://lore.kernel.org/u-boot/[email protected]/
Diffstat (limited to 'include/pxe_utils.h')
-rw-r--r--include/pxe_utils.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/pxe_utils.h b/include/pxe_utils.h
index 9f195930487..68ac40b64ad 100644
--- a/include/pxe_utils.h
+++ b/include/pxe_utils.h
@@ -62,6 +62,7 @@ struct pxe_label {
*
* title - the name of the menu as given by a 'menu title' line.
* default_label - the name of the default label, if any.
+ * fallback_label - the name of the fallback label, if any.
* bmp - the bmp file name which is displayed in background
* timeout - time in tenths of a second to wait for a user key-press before
* booting the default label.
@@ -73,6 +74,7 @@ struct pxe_label {
struct pxe_menu {
char *title;
char *default_label;
+ char *fallback_label;
char *bmp;
int timeout;
int prompt;
@@ -94,6 +96,8 @@ typedef int (*pxe_getfile_func)(struct pxe_context *ctx, const char *file_path,
* allocated
* @pxe_file_size: Size of the PXE file
* @use_ipv6: TRUE : use IPv6 addressing, FALSE : use IPv4 addressing
+ * @use_fallback: TRUE : use "fallback" option as default, FALSE : use
+ * "default" option as default
*/
struct pxe_context {
struct cmd_tbl *cmdtp;
@@ -114,6 +118,7 @@ struct pxe_context {
char *bootdir;
ulong pxe_file_size;
bool use_ipv6;
+ bool use_fallback;
};
/**
@@ -213,12 +218,17 @@ int format_mac_pxe(char *outbuf, size_t outbuf_len);
* none
* @use_ipv6: TRUE : use IPv6 addressing
* FALSE : use IPv4 addressing
+ * @use_fallback: TRUE : Use "fallback" option instead of "default" should no
+ * other choice be selected
+ * FALSE : Use "default" option should no other choice be
+ * selected
* Return: 0 if OK, -ENOMEM if out of memory, -E2BIG if bootfile is larger than
* MAX_TFTP_PATH_LEN bytes
*/
int pxe_setup_ctx(struct pxe_context *ctx, struct cmd_tbl *cmdtp,
pxe_getfile_func getfile, void *userdata,
- bool allow_abs_path, const char *bootfile, bool use_ipv6);
+ bool allow_abs_path, const char *bootfile, bool use_ipv6,
+ bool use_fallback);
/**
* pxe_destroy_ctx() - Destroy a PXE context