diff options
author | Simon Glass <sjg@chromium.org> | 2025-05-02 08:46:20 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-30 09:49:32 +0100 |
commit | 932ea4a1044455e7bcb48fb1391ea7e06137fad5 (patch) | |
tree | 1f3beae236e8dac8a020e688750f933b7583c718 /boot/cedit.c | |
parent | cd5b7d3132a0816f049df19c863a71e9596d644b (diff) |
expo: Move cedit-state fields into expo
Move the boolean flags into struct expo so that the state can be
maintained over function calls.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/cedit.c')
-rw-r--r-- | boot/cedit.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/boot/cedit.c b/boot/cedit.c index b7b9cc510e0..8c6948d1d46 100644 --- a/boot/cedit.c +++ b/boot/cedit.c @@ -154,7 +154,6 @@ int cedit_run(struct expo *exp) struct video_priv *vid_priv; uint scene_id; struct scene *scn; - bool done, save; int ret; ret = cedit_prepare(exp, &vid_priv, &scn); @@ -162,8 +161,8 @@ int cedit_run(struct expo *exp) return log_msg_ret("prep", ret); scene_id = ret; - done = false; - save = false; + exp->done = false; + exp->save = false; do { struct expo_action act; @@ -179,11 +178,11 @@ int cedit_run(struct expo *exp) cedit_arange(exp, vid_priv, scene_id); switch (scn->highlight_id) { case EXPOID_SAVE: - done = true; - save = true; + exp->done = true; + exp->save = true; break; case EXPOID_DISCARD: - done = true; + exp->done = true; break; } break; @@ -197,7 +196,7 @@ int cedit_run(struct expo *exp) break; case EXPOACT_QUIT: log_debug("quitting\n"); - done = true; + exp->done = true; break; default: break; @@ -205,11 +204,11 @@ int cedit_run(struct expo *exp) } else if (ret != -EAGAIN) { return log_msg_ret("cep", ret); } - } while (!done); + } while (!exp->done); if (ret) return log_msg_ret("end", ret); - if (!save) + if (!exp->save) return -EACCES; return 0; |