[U-Boot] [PATCH v3 1/7] Add generic, reusable menu code

Wolfgang Denk wd at denx.de
Mon Jul 25 23:18:15 CEST 2011


Dear "Jason Hobbs",

In message <1309364719-16219-2-git-send-email-jason.hobbs at calxeda.com> you wrote:
> This will be used first by the pxecfg code, but is intended to be
> generic and reusable for other jobs in U-boot.
> 
> Signed-off-by: Jason Hobbs <jason.hobbs at calxeda.com>
> ---
> changes in v2:
>  - new in v2
> 
> changes in v3:
>  - move timeout support to later patch
>  - fix NULL case bug in menu_item_key_match
>  - consistently use 'item_key' instead of 'key'
>  - move default/prompt logic into menu code
>  - consistently return int for error propagation
>  - change option setting functions to menu_create paramaters
>  - add README.menu
> 
>  common/Makefile |    1 +
>  common/menu.c   |  266 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  doc/README.menu |  158 ++++++++++++++++++++++++++++++++
>  include/menu.h  |   30 ++++++
>  4 files changed, 455 insertions(+), 0 deletions(-)
>  create mode 100644 common/menu.c
>  create mode 100644 doc/README.menu
>  create mode 100644 include/menu.h

I am happy that you provide documentation in doc/README.menu, but I
really dislike that the code itself is basicly uncommented. It is a
major pain to have to switch between the README and the source files
when trying to understand the code.

Please add sufficient comments to the code to make it readable.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is practically impossible to teach good programming style to  stu-
dents that have had prior exposure to BASIC: as potential programmers
they are mentally mutilated beyond hope of regeneration.   - Dijkstra


More information about the U-Boot mailing list