"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

expo: Drop the render from expo_poll()

Within tests it is useful to be able to control rendering of the expo.
Drop the automatic call to expo_render() within expo_poll() and adjust
its callers to handle this instead.

Signed-off-by: Simon Glass <sjg@chromium.org>

Simon Glass 8d7ae52d 5bca4798

+13 -7
+4
boot/cedit.c
··· 219 219 do { 220 220 struct expo_action act; 221 221 222 + ret = expo_render(exp); 223 + if (ret) 224 + return log_msg_ret("cer", ret); 225 + 222 226 ret = expo_poll(exp, &act); 223 227 if (!ret) 224 228 cedit_do_action(exp, scn, vid_priv, &act);
-4
boot/expo.c
··· 320 320 { 321 321 int ichar, key, ret; 322 322 323 - ret = expo_render(exp); 324 - if (ret) 325 - return log_msg_ret("ere", ret); 326 - 327 323 ichar = cli_ch_process(&exp->cch, 0); 328 324 if (!ichar) { 329 325 int i;
+3
cmd/bootflow.c
··· 116 116 return log_msg_ret("bhs", ret); 117 117 118 118 do { 119 + ret = expo_render(exp); 120 + if (ret) 121 + return log_msg_ret("bhr", ret); 119 122 ret = bootflow_menu_poll(exp, &bflow); 120 123 } while (ret == -EAGAIN); 121 124
+6 -3
include/expo.h
··· 1006 1006 int cb_expo_build(struct expo **expp); 1007 1007 1008 1008 /** 1009 - * expo_poll() - render an expo and see if the user takes an action 1009 + * expo_poll() - see if the user takes an action 1010 + * 1011 + * This checks for a keypress. If there is one, it is processed and the 1012 + * resulting action returned, if any. 1010 1013 * 1011 - * Thsi calls expo_render() and then checks for a keypress. If there is one, it 1012 - * is processed and the resulting action returned, if any 1014 + * Note that expo_render() should normally be called immediately before this 1015 + * function so that the user can see the latest state. 1013 1016 * 1014 1017 * @exp: Expo to poll 1015 1018 * @act: Returns action on success