[U-Boot] [RFC/PATCH 1/2] Add menu Framework

Jean-Christophe PLAGNIOL-VILLARD
2009-06-16T15:17:20Z

On 12:54 Tue 16 Jun , Detlev Zundel wrote:
> 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
ok tks

Best Regards,
J.