[U-Boot] [RFC/PATCH 1/2] Add menu Framework
Detlev Zundel
dzu at denx.de
Tue Jun 16 12:54:38 CEST 2009
Hi Jean-Christophe,
>> > +#if defined(CONFIG_CMD_MENU_MANAGEMENT)
>> > + if (!strncmp(argv[0], "a", 1))
>> > + return do_menu_add(cmdtp, flag, argc, argv);
>> > + if (!strncmp(argv[0], "e", 1))
>> > + return do_menu_entry(cmdtp, flag, argc, argv);
>> > +#endif
>> > + if (!strncmp(argv[0], "l", 1))
>> > + return do_menu_list(cmdtp, flag, argc, argv);
>> > + if (!strncmp(argv[0], "s", 1))
>> > + return do_menu_show(cmdtp, flag, argc, argv);
>> > + else
>> > + cmd_usage(cmdtp);
>>
>> Please use the existing command parser for such subcommands.
> ok which one?
Build your own cmd_tbl_t and use find_cmd_tbl. For an example see
boards/inka4x0/inkadiag.c
Cheers
Detlev
--
Who is General Failure and why is he reading my hard disk?
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the U-Boot
mailing list