summaryrefslogtreecommitdiff
path: root/cmd/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-05-02 08:46:16 -0600
committerSimon Glass <[email protected]>2025-05-30 09:49:31 +0100
commitbf9860459516d1837e92270340ca307211cd961a (patch)
tree07a30de0e77474896d5a0f942fda3150ef14b44a /cmd/bootflow.c
parent5c365ecabcac6d3218cf7e560bda01629a46d88e (diff)
expo: Add a function to poll for input
Both bootflow_menu and cedit use similar logic to poll an expo. Move this into the expo library so the code can be shared. Update bootflow_menu_run() to return -EPIPE when the user quits without choosing anything, since -EAGAIN is ambiguous and elsewhere means that there is no input yet. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd/bootflow.c')
-rw-r--r--cmd/bootflow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index d4f7d336150..f2662239714 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -110,7 +110,7 @@ __maybe_unused static int bootflow_handle_menu(struct bootstd_priv *std,
ret = bootflow_menu_run(std, text_mode, &bflow);
if (ret) {
- if (ret == -EAGAIN) {
+ if (ret == -EPIPE) {
printf("Nothing chosen\n");
std->cur_bootflow = NULL;
} else {