From 06a9d88e4d887ea4c7395636d2cfb52948ab4112 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:55 -0600 Subject: expo: Update bootflow_menu_poll() to return a sequence ID Rather than returning a bootflow, return the index of the bootflow. This will allow callers to do their own translation to bootflows or some other data structure. Also return a special code when the user tries to move the pointer, so that the caller can cancel the boot-menu timeout, if this is in use. Signed-off-by: Simon Glass --- include/bootflow.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/bootflow.h b/include/bootflow.h index 615fb97f4a4..75d88d47884 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -670,10 +670,10 @@ int bootflow_menu_start(struct bootstd_priv *std, bool text_mode, * bootflow_menu_poll() - Poll a menu for user action * * @exp: Expo to poll - * @bflowp: Returns chosen bootflow (set to NULL if nothing is chosen) - * Return 0 if a bootflow was chosen, -EAGAIN if nothing is chosen yet, -EPIPE - * if the user quit + * @seqp: Returns the bootflow chosen or currently pointed to (numbered from 0) + * Return: 0 if a bootflow was chosen, -EAGAIN if nothing is chosen yet, -EPIPE + * if the user quit, -ERESTART if the expo needs refreshing */ -int bootflow_menu_poll(struct expo *exp, struct bootflow **bflowp); +int bootflow_menu_poll(struct expo *exp, int *seqp); #endif -- cgit v1.3.1