summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/main_help.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/shell/main_help.c')
-rw-r--r--cpukit/libmisc/shell/main_help.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/cpukit/libmisc/shell/main_help.c b/cpukit/libmisc/shell/main_help.c
index 19339594dc..393d7e8172 100644
--- a/cpukit/libmisc/shell/main_help.c
+++ b/cpukit/libmisc/shell/main_help.c
@@ -27,12 +27,16 @@
* show the help for one command.
*/
static int rtems_shell_help_cmd(
- rtems_shell_cmd_t *shell_cmd
+ const rtems_shell_cmd_t *shell_cmd
)
{
const char * pc;
int col,line;
+ if (!rtems_shell_can_see_cmd(shell_cmd)) {
+ return 0;
+ }
+
printf("%-12.12s - ",shell_cmd->name);
col = 14;
line = 1;
@@ -149,10 +153,9 @@ static int rtems_shell_help(
}
rtems_shell_cmd_t rtems_shell_HELP_Command = {
- "help", /* name */
- "help [topic] # list of usage of commands", /* usage */
- "help", /* topic */
- rtems_shell_help, /* command */
- NULL, /* alias */
- NULL /* next */
+ .name = "help",
+ .usage = "help [topic] # list of usage of commands",
+ .topic = "help",
+ .command = rtems_shell_help,
+ .mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
};