mirror of
https://xff.cz/git/u-boot/
synced 2025-09-21 10:32:07 +02:00
command: Use a constant pointer for the help
This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -45,7 +45,7 @@ struct cmd_tbl {
|
|||||||
char *const argv[]);
|
char *const argv[]);
|
||||||
char *usage; /* Usage message (short) */
|
char *usage; /* Usage message (short) */
|
||||||
#ifdef CONFIG_SYS_LONGHELP
|
#ifdef CONFIG_SYS_LONGHELP
|
||||||
char *help; /* Help message (long) */
|
const char *help; /* Help message (long) */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_AUTO_COMPLETE
|
#ifdef CONFIG_AUTO_COMPLETE
|
||||||
/* do auto completion on the arguments */
|
/* do auto completion on the arguments */
|
||||||
|
Reference in New Issue
Block a user