summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/ipe337/cmd_alternate.c2
-rw-r--r--commands/bootm.c14
-rw-r--r--commands/cat.c2
-rw-r--r--commands/cd.c2
-rw-r--r--commands/cp.c2
-rw-r--r--commands/crc.c2
-rw-r--r--commands/edit.c10
-rw-r--r--commands/export.c2
-rw-r--r--commands/flash.c4
-rw-r--r--commands/go.c8
-rw-r--r--commands/loadenv.c2
-rw-r--r--commands/ls.c2
-rw-r--r--commands/mem.c8
-rw-r--r--commands/memtest.c3
-rw-r--r--commands/mkdir.c2
-rw-r--r--commands/mount.c2
-rw-r--r--commands/net.c4
-rwxr-xr-xcommands/partition.c4
-rw-r--r--commands/printenv.c11
-rw-r--r--commands/readline.c2
-rw-r--r--commands/rm.c2
-rw-r--r--commands/rmdir.c2
-rw-r--r--commands/saveenv.c2
-rw-r--r--commands/setenv.c13
-rw-r--r--commands/test.c8
-rw-r--r--commands/timeout.c2
-rw-r--r--commands/umount.c2
-rw-r--r--common/command.c12
-rw-r--r--common/hush.c11
-rw-r--r--common/module.c2
-rw-r--r--include/command.h8
-rw-r--r--lib/driver.c2
32 files changed, 85 insertions, 69 deletions
diff --git a/board/ipe337/cmd_alternate.c b/board/ipe337/cmd_alternate.c
index ce2e3e0..b007cf1 100644
--- a/board/ipe337/cmd_alternate.c
+++ b/board/ipe337/cmd_alternate.c
@@ -46,7 +46,7 @@ static int do_alternate (cmd_tbl_t *cmdtp, int argc, char *argv[])
return (bitcount & 1) ? 3 : 2;
}
-static __maybe_unused char cmd_alternate_help[] =
+static const __maybe_unused char cmd_alternate_help[] =
"Usage: alternate <file>"
"\n";
diff --git a/commands/bootm.c b/commands/bootm.c
index a7ab6b5..e210059 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -460,16 +460,18 @@ err_out:
return 1;
}
+static const __maybe_unused char cmd_bootm_help[] =
+"Usage: bootm [OPTION] image\n"
+"Boot application image\n"
+" -n do not verify the images (speeds up boot process)\n"
+" -h show advanced options\n";
+
+
U_BOOT_CMD_START(bootm)
.maxargs = CONFIG_MAXARGS,
.cmd = do_bootm,
.usage = "boot application image",
- U_BOOT_CMD_HELP(
- "Usage: bootm [OPTION] image\n"
- "Boot application image\n"
- " -n do not verify the images (speeds up boot process)\n"
- " -h show advanced options\n"
- )
+ U_BOOT_CMD_HELP(cmd_bootm_help)
U_BOOT_CMD_END
#ifdef CONFIG_CMD_IMI
diff --git a/commands/cat.c b/commands/cat.c
index 0840fdf..d6f9b7a 100644
--- a/commands/cat.c
+++ b/commands/cat.c
@@ -84,7 +84,7 @@ out:
return err;
}
-static __maybe_unused char cmd_cat_help[] =
+static const __maybe_unused char cmd_cat_help[] =
"Usage: cat [FILES]\n"
"Concatenate files on stdout. Currently only printable characters\n"
"and \\n and \\t are printed, but this should be optional\n";
diff --git a/commands/cd.c b/commands/cd.c
index 5d5cacb..57141e3 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -47,7 +47,7 @@ static int do_cd (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_cd_help[] =
+static const __maybe_unused char cmd_cd_help[] =
"Usage: cd [directory]\n"
"change to directory. If called without argument, change to /\n";
diff --git a/commands/cp.c b/commands/cp.c
index a9c10d4..f2b8841 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -134,7 +134,7 @@ out:
return ret;
}
-static __maybe_unused char cmd_cp_help[] =
+static const __maybe_unused char cmd_cp_help[] =
"Usage: cp <source> <destination>\n"
"cp copies file <source> to <destination>.\n"
"Currently only this form is supported and you have to specify the exact target\n"
diff --git a/commands/crc.c b/commands/crc.c
index f5a8e3b..979d3b2 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -106,7 +106,7 @@ out:
return err;
}
-static __maybe_unused char cmd_crc_help[] =
+static const __maybe_unused char cmd_crc_help[] =
"Usage: crc32 [OPTION] [AREA]\n"
"Calculate a crc32 checksum of a memory area\n"
"Options:\n"
diff --git a/commands/edit.c b/commands/edit.c
index 3a685eb..6fb4a61 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -237,7 +237,7 @@ static int edit_read_file(const char *path)
if (!lineend)
break;
- linestr = lineend + 1;
+ linestr = lineend + 1;
}
free(filebuffer);
}
@@ -550,9 +550,9 @@ out:
return 0;
}
-static char *edit_aliases[] = { "sedit", NULL};
+static const char *edit_aliases[] = { "sedit", NULL};
-static __maybe_unused char cmd_edit_help[] =
+static const __maybe_unused char cmd_edit_help[] =
"Usage: (s)edit <file>\n"
"This is a very small editor. Its only features are moving the cursor with\n"
"the usual keys and typing characters.\n"
@@ -561,11 +561,13 @@ static __maybe_unused char cmd_edit_help[] =
"\n"
"If called as sedit the editor uses ansi codes to scroll the screen.\n";
+static const __maybe_unused char cmd_edit_usage[] = "edit a file";
+
U_BOOT_CMD_START(edit)
.maxargs = 2,
.cmd = do_edit,
.aliases = edit_aliases,
- .usage = "edit a file",
+ .usage = cmd_edit_usage,
U_BOOT_CMD_HELP(cmd_edit_help)
U_BOOT_CMD_END
diff --git a/commands/export.c b/commands/export.c
index b5eb5cf..9ab75e4 100644
--- a/commands/export.c
+++ b/commands/export.c
@@ -53,7 +53,7 @@ static int do_export ( cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_export_help[] =
+static const __maybe_unused char cmd_export_help[] =
"Usage: export <var>[=value]...\n"
"export an environment variable to subsequently executed scripts\n";
diff --git a/commands/flash.c b/commands/flash.c
index cfbf903..8dbfeeb 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -85,7 +85,7 @@ static int do_flerase (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_erase_help[] =
+static const __maybe_unused char cmd_erase_help[] =
"Usage: Erase <device> [area]\n"
"Erase a flash device or parts of a device if an area specification\n"
"is given\n";
@@ -161,7 +161,7 @@ static int do_protect (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_protect_help[] =
+static const __maybe_unused char cmd_protect_help[] =
"Usage: (un)protect <device> [area]\n"
"(un)protect a flash device or parts of a device if an area specification\n"
"is given\n";
diff --git a/commands/go.c b/commands/go.c
index a1fd2f0..7ba6b37 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -50,13 +50,13 @@ static int do_go (cmd_tbl_t *cmdtp, int argc, char *argv[])
return rcode;
}
-/* -------------------------------------------------------------------- */
+static const __maybe_unused char cmd_go_help[] =
+"addr [arg ...]\n - start application at address 'addr'\n"
+" passing 'arg' as arguments\n";
U_BOOT_CMD_START(go)
.maxargs = CONFIG_MAXARGS,
.cmd = do_go,
.usage = "start application at address 'addr'",
- U_BOOT_CMD_HELP(
- "addr [arg ...]\n - start application at address 'addr'\n"
- " passing 'arg' as arguments\n")
+ U_BOOT_CMD_HELP(cmd_go_help)
U_BOOT_CMD_END
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 5db132c..ee76699 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -43,7 +43,7 @@ static int do_loadenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
return envfs_load(filename, dirname);
}
-static __maybe_unused char cmd_loadenv_help[] =
+static const __maybe_unused char cmd_loadenv_help[] =
"Usage: loadenv [ENVFS] [DIRECTORY]\n"
"Load the persistent storage contained in <envfs> to the directory\n"
"<directory>.\n"
diff --git a/commands/ls.c b/commands/ls.c
index b9263e6..b0d6808 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -152,7 +152,7 @@ static int do_ls (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_ls_help[] =
+static const __maybe_unused char cmd_ls_help[] =
"Usage: ls [OPTION]... [FILE]...\n"
"List information about the FILEs (the current directory by default).\n"
" -R list subdirectories recursively\n";
diff --git a/commands/mem.c b/commands/mem.c
index 8563b2d..be71ee4 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -211,7 +211,7 @@ out:
return errno;
}
-static __maybe_unused char cmd_md_help[] =
+static const __maybe_unused char cmd_md_help[] =
"Usage md [OPTIONS] <region>\n"
"display (hexdump) a memory region.\n"
"options:\n"
@@ -292,7 +292,7 @@ static int do_mem_mw ( cmd_tbl_t *cmdtp, int argc, char *argv[])
return errno;
}
-static __maybe_unused char cmd_mw_help[] =
+static const __maybe_unused char cmd_mw_help[] =
"Usage: mw [OPTIONS] <region> <value(s)>\n"
"Write value(s) to the specifies region.\n"
"see 'help md' for supported options.\n";
@@ -396,7 +396,7 @@ out:
return ret;
}
-static __maybe_unused char cmd_memcmp_help[] =
+static const __maybe_unused char cmd_memcmp_help[] =
"Usage: memcmp [OPTIONS] <addr1> <addr2> <count>\n"
"\n"
"options:\n"
@@ -498,7 +498,7 @@ out:
return ret;
}
-static __maybe_unused char cmd_memcpy_help[] =
+static const __maybe_unused char cmd_memcpy_help[] =
"Usage: memcpy [OPTIONS] <src> <dst> <count>\n"
"\n"
"options:\n"
diff --git a/commands/memtest.c b/commands/memtest.c
index a1d2df0..16cc7cc 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -342,7 +342,7 @@ static int do_mem_mtest (cmd_tbl_t *cmdtp, int argc, char *argv[])
return mem_test(start, end, pattern);
}
-static __maybe_unused char cmd_mtest_help[] =
+static const __maybe_unused char cmd_mtest_help[] =
"Usage: <start> <end> "
#ifdef CONFIG_CMD_MTEST_ALTERNATIVE
"[pattern]"
@@ -353,5 +353,6 @@ U_BOOT_CMD_START(mtest)
.maxargs = 4,
.cmd = do_mem_mtest,
.usage = "simple RAM test",
+ U_BOOT_CMD_HELP(cmd_mtest_help)
U_BOOT_CMD_END
diff --git a/commands/mkdir.c b/commands/mkdir.c
index d6464e1..a2c2982 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -63,7 +63,7 @@ static int do_mkdir (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_mkdir_help[] =
+static const __maybe_unused char cmd_mkdir_help[] =
"Usage: mkdir [directories]\n"
"Create new directories\n";
diff --git a/commands/mount.c b/commands/mount.c
index 03b63f0..eefcdfa 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -60,7 +60,7 @@ static int do_mount (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_mount_help[] =
+static const __maybe_unused char cmd_mount_help[] =
"Usage: mount: list mounted filesystems\n"
"or: mount <device> <fstype> <mountpoint>\n"
"\n"
diff --git a/commands/net.c b/commands/net.c
index 93c6365..629f690 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -94,7 +94,7 @@ static int do_tftpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
return netboot_common (TFTP, cmdtp, argc, argv);
}
-static __maybe_unused char cmd_tftp_help[] =
+static const __maybe_unused char cmd_tftp_help[] =
"Usage: tftp <file> [localfile]\n"
"Load a file via network using BootP/TFTP protocol.\n";
@@ -173,7 +173,7 @@ static int do_nfs (cmd_tbl_t *cmdtp, int argc, char *argv[])
return netboot_common(NFS, cmdtp, argc, argv);
}
-static __maybe_unused char cmd_nfs_help[] =
+static const __maybe_unused char cmd_nfs_help[] =
"Usage: nfs <file> [localfile]\n"
"Load a file via network using nfs protocol.\n";
diff --git a/commands/partition.c b/commands/partition.c
index 164d4f0..dfc4e0d 100755
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -226,7 +226,7 @@ err_out:
return 1;
}
-static __maybe_unused char cmd_addpart_help[] =
+static const __maybe_unused char cmd_addpart_help[] =
"Usage: addpart <device> <partition description>\n"
"\n"
"addpart adds a partition description to a device. The partition description\n"
@@ -286,7 +286,7 @@ static int do_delpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_delpart_help[] =
+static const __maybe_unused char cmd_delpart_help[] =
"Usage: delpart <device>\n"
"Delete partitions previously added to a device with addpart.\n";
diff --git a/commands/printenv.c b/commands/printenv.c
index 385596c..8766a12 100644
--- a/commands/printenv.c
+++ b/commands/printenv.c
@@ -65,14 +65,17 @@ static int do_printenv (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
+static const __maybe_unused char cmd_printenv_help[] =
+"\n - print values of all environment variables\n"
+"printenv name ...\n"
+" - print value of environment variable 'name'\n";
+
+
U_BOOT_CMD_START(printenv)
.maxargs = CONFIG_MAXARGS,
.cmd = do_printenv,
.usage = "print environment variables",
- U_BOOT_CMD_HELP(
- "\n - print values of all environment variables\n"
- "printenv name ...\n"
- " - print value of environment variable 'name'\n")
+ U_BOOT_CMD_HELP(cmd_printenv_help)
U_BOOT_CMD_END
/**
diff --git a/commands/readline.c b/commands/readline.c
index 921b72a..cd24f35 100644
--- a/commands/readline.c
+++ b/commands/readline.c
@@ -47,7 +47,7 @@ static int do_readline (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_readline_help[] =
+static const __maybe_unused char cmd_readline_help[] =
"Usage: readline <prompt> VAR\n"
"readline reads a line of user input into variable VAR.\n";
diff --git a/commands/rm.c b/commands/rm.c
index e8bc777..f8a84f3 100644
--- a/commands/rm.c
+++ b/commands/rm.c
@@ -44,7 +44,7 @@ static int do_rm (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_rm_help[] =
+static const __maybe_unused char cmd_rm_help[] =
"Usage: rm [FILES]\n"
"Remove files\n";
diff --git a/commands/rmdir.c b/commands/rmdir.c
index 182fa37..aaa7f80 100644
--- a/commands/rmdir.c
+++ b/commands/rmdir.c
@@ -23,7 +23,7 @@ static int do_rmdir (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_rmdir_help[] =
+static const __maybe_unused char cmd_rmdir_help[] =
"Usage: rmdir [directories]\n"
"Remove directories. The directories have to be empty.\n";
diff --git a/commands/saveenv.c b/commands/saveenv.c
index ef195bc..e0aef54 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -90,7 +90,7 @@ out:
return ret;
}
-static __maybe_unused char cmd_saveenv_help[] =
+static const __maybe_unused char cmd_saveenv_help[] =
"Usage: saveenv [<envfs>] [<directory>]\n"
"Save the files in <directory> to the persistent storage device <envfs>.\n"
"<envfs> is normally a block in flash, but could be any other file.\n"
diff --git a/commands/setenv.c b/commands/setenv.c
index 2127da3..b6fd81a 100644
--- a/commands/setenv.c
+++ b/commands/setenv.c
@@ -40,15 +40,18 @@ static int do_setenv ( cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
+static const __maybe_unused char cmd_setenv_help[] =
+"name value ...\n"
+" - set environment variable 'name' to 'value ...'\n"
+"setenv name\n"
+" - delete environment variable 'name'\n";
+
+
U_BOOT_CMD_START(setenv)
.maxargs = CONFIG_MAXARGS,
.cmd = do_setenv,
.usage = "set environment variables",
- U_BOOT_CMD_HELP(
- "name value ...\n"
- " - set environment variable 'name' to 'value ...'\n"
- "setenv name\n"
- " - delete environment variable 'name'\n")
+ U_BOOT_CMD_HELP(cmd_setenv_help)
U_BOOT_CMD_END
/**
diff --git a/commands/test.c b/commands/test.c
index fb986d4..67807c0 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -220,17 +220,19 @@ out:
return expr;
}
-char *test_aliases[] = { "[", NULL};
+static const char *test_aliases[] = { "[", NULL};
-static __maybe_unused char cmd_test_help[] =
+static const __maybe_unused char cmd_test_help[] =
"Usage: test [OPTIONS]\n"
"options: !, =, !=, -eq, -ne, -ge, -gt, -le, -lt, -o, -a, -z, -n, -d, -e, -f\n"
"see 'man test' on your PC for more information.\n";
+static const __maybe_unused char cmd_test_usage[] = "minimal test like /bin/sh";
+
U_BOOT_CMD_START(test)
.aliases = test_aliases,
.maxargs = CONFIG_MAXARGS,
.cmd = do_test,
- .usage = "minimal test like /bin/sh",
+ .usage = cmd_test_usage,
U_BOOT_CMD_HELP(cmd_test_help)
U_BOOT_CMD_END
diff --git a/commands/timeout.c b/commands/timeout.c
index 639f361..3fa687c 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -97,7 +97,7 @@ out:
return ret;
}
-static __maybe_unused char cmd_timeout_help[] =
+static const __maybe_unused char cmd_timeout_help[] =
"Usage: timeout [OPTION]... <timeout>\n"
"Wait <timeout> seconds for a timeout. Return 1 if the user intervented\n"
"or 0 if a timeout occured\n"
diff --git a/commands/umount.c b/commands/umount.c
index 3db3527..1314473 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -40,7 +40,7 @@ static int do_umount (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_umount_help[] =
+static const __maybe_unused char cmd_umount_help[] =
"Usage: umount <mountpoint>\n"
"umount a filesystem mounted on a specific mountpoint\n";
diff --git a/common/command.c b/common/command.c
index 94a8f28..d1b19c0 100644
--- a/common/command.c
+++ b/common/command.c
@@ -142,14 +142,14 @@ static int do_help (cmd_tbl_t * cmdtp, int argc, char *argv[])
}
}
-static __maybe_unused char cmd_help_help[] =
+static const __maybe_unused char cmd_help_help[] =
"Show help information (for 'command')\n"
"'help' prints online help for the monitor commands.\n\n"
"Without arguments, it prints a short usage message for all commands.\n\n"
"To get detailed help information for specific commands you can type\n"
"'help' with one or more command names as arguments.\n";
-static char *help_aliases[] = { "?", NULL};
+static const char *help_aliases[] = { "?", NULL};
U_BOOT_CMD_START(help)
.maxargs = 2,
@@ -161,8 +161,8 @@ U_BOOT_CMD_END
static int compare(struct list_head *a, struct list_head *b)
{
- char *na = list_entry(a, cmd_tbl_t, list)->name;
- char *nb = list_entry(b, cmd_tbl_t, list)->name;
+ char *na = (char*)list_entry(a, cmd_tbl_t, list)->name;
+ char *nb = (char*)list_entry(b, cmd_tbl_t, list)->name;
return strcmp(na, nb);
}
@@ -180,7 +180,7 @@ int register_command(cmd_tbl_t *cmd)
list_add_sort(&cmd->list, &command_list, compare);
if (cmd->aliases) {
- char **aliases = cmd->aliases;
+ char **aliases = (char**)cmd->aliases;
while(*aliases) {
char *usage = "alias for ";
cmd_tbl_t *c = xzalloc(sizeof(cmd_tbl_t));
@@ -189,7 +189,7 @@ int register_command(cmd_tbl_t *cmd)
c->name = *aliases;
c->usage = xmalloc(strlen(usage) + strlen(cmd->name) + 1);
- sprintf(c->usage, "%s%s", usage, cmd->name);
+ sprintf((char*)c->usage, "%s%s", usage, cmd->name);
c->aliases = NULL;
diff --git a/common/hush.c b/common/hush.c
index 878312f..245dede 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1596,7 +1596,7 @@ static int do_sh(cmd_tbl_t *cmdtp, int argc, char *argv[])
return execute_script(argv[1], argc - 1, argv + 1);
}
-static __maybe_unused char cmd_sh_help[] =
+static const __maybe_unused char cmd_sh_help[] =
"Usage: sh filename [arguments]\n"
"\n"
"Execute a shell script\n";
@@ -1618,9 +1618,9 @@ static int do_source(cmd_tbl_t *cmdtp, int argc, char *argv[])
return source_script(argv[1], argc - 1, argv + 1);
}
-static char *source_aliases[] = { ".", NULL};
+static const char *source_aliases[] = { ".", NULL};
-static __maybe_unused char cmd_source_help[] =
+static const __maybe_unused char cmd_source_help[] =
"Usage: . filename [arguments]\n"
"or source filename [arguments]\n"
"\n"
@@ -1628,11 +1628,14 @@ static __maybe_unused char cmd_source_help[] =
"environment and return the exit status of the last command exe-\n"
"cuted from filename\n";
+static const __maybe_unused char cmd_source_usage[] =
+"execute shell script in current shell environment";
+
U_BOOT_CMD_START(source)
.maxargs = CONFIG_MAXARGS,
.aliases = source_aliases,
.cmd = do_source,
- .usage = "execute shell script in current shell environment",
+ .usage = cmd_source_usage,
U_BOOT_CMD_HELP(cmd_source_help)
U_BOOT_CMD_END
diff --git a/common/module.c b/common/module.c
index 8b91ddd..54c40dd 100644
--- a/common/module.c
+++ b/common/module.c
@@ -368,7 +368,7 @@ static int do_insmod (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_insmod_help[] =
+static const __maybe_unused char cmd_insmod_help[] =
"Usage: insmod <module>\n";
U_BOOT_CMD_START(insmod)
diff --git a/include/command.h b/include/command.h
index 563d24f..fa9acc8 100644
--- a/include/command.h
+++ b/include/command.h
@@ -44,16 +44,16 @@ extern struct list_head command_list;
*/
struct cmd_tbl_s {
- char *name; /* Command Name */
- char **aliases;
+ const char *name; /* Command Name */
+ const char **aliases;
int maxargs; /* maximum number of arguments */
/* Implementation function */
int (*cmd)(struct cmd_tbl_s *, int, char *[]);
- char *usage; /* Usage message (short) */
+ const char *usage; /* Usage message (short) */
struct list_head list; /* List of commands */
#ifdef CONFIG_LONGHELP
- char *help; /* Help message (long) */
+ const char *help; /* Help message (long) */
#endif
}
#ifdef __x86_64__
diff --git a/lib/driver.c b/lib/driver.c
index 27971e8..f3129c4 100644
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -329,7 +329,7 @@ static int do_devinfo ( cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
-static __maybe_unused char cmd_devinfo_help[] =
+static const __maybe_unused char cmd_devinfo_help[] =
"Usage: devinfo [DEVICE]\n"
"If called without arguments devinfo shows a summary about known devices and\n"
"drivers. If called with a device path as argument devinfo shows more detailed\n"