From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC/PATCH 1/2] Add menu Framework
Date: Tue, 16 Jun 2009 12:54:38 +0200 [thread overview]
Message-ID: <m2ws7cxxch.fsf@ohwell.denx.de> (raw)
In-Reply-To: <20090615130446.GS22102@game.jcrosoft.org> (Jean-Christophe PLAGNIOL-VILLARD's message of "Mon, 15 Jun 2009 15:04:46 +0200")
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
next prev parent reply other threads:[~2009-06-16 10:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 19:10 [U-Boot] [RFC] Menu Frameworj Jean-Christophe PLAGNIOL-VILLARD
2009-06-13 19:13 ` [U-Boot] [RFC/PATCH 1/2] Add menu Framework Jean-Christophe PLAGNIOL-VILLARD
2009-06-13 19:13 ` [U-Boot] [RFC/PATCH 1/2] r2dplus: add menu example support Jean-Christophe PLAGNIOL-VILLARD
2009-06-13 23:15 ` Wolfgang Denk
2009-06-15 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-13 23:14 ` [U-Boot] [RFC/PATCH 1/2] Add menu Framework Wolfgang Denk
2009-06-15 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-16 10:54 ` Detlev Zundel [this message]
2009-06-16 15:17 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-15 6:04 ` Mike Frysinger
2009-06-15 8:16 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-13 23:09 ` [U-Boot] [RFC] Menu Frameworj Wolfgang Denk
2009-06-14 8:27 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 8:51 ` Wolfgang Denk
2009-06-14 9:22 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 10:22 ` Wolfgang Denk
2009-06-14 10:29 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 10:44 ` Wolfgang Denk
2009-06-14 11:00 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 15:05 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 9:24 ` Mike Frysinger
2009-06-14 9:24 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 10:26 ` Wolfgang Denk
2009-06-14 10:35 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 10:46 ` Wolfgang Denk
2009-06-14 11:15 ` Mike Frysinger
2009-06-14 11:20 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 11:49 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ws7cxxch.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox