bootstd: Indicate refresh need with bootflow_menu_poll()

When the user presses 'up' when on the top menu item, it is a waste of
time to refresh since nothing has changed.

Add a new return code from this function to indicate that the UI must be
refreshed.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-24 09:41:09 -06:00
parent b03ea854d4
commit ca46bc3115
3 changed files with 6 additions and 2 deletions

View File

@@ -699,7 +699,9 @@ int bootflow_menu_start(struct bootstd_priv *std, bool text_mode,
* @exp: Expo to poll
* @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
* if the user quit, -EREMCHG if the expo needs refreshing, -ERESTART if
* the user tried to move to a new selection but was unable (e.g. already
* at the top and tried to move up)
*/
int bootflow_menu_poll(struct expo *exp, int *seqp);