Changeset bac3d6d in rtems


Ignore:
Timestamp:
Nov 17, 2014, 2:42:57 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
7a2c30f
Parents:
e02d5dd9
git-author:
Sebastian Huber <sebastian.huber@…> (11/17/14 14:42:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/20/14 09:30:24)
Message:

shell: Rename HALT to SHUTDOWN command

Use a normal command for shutdown via exit().

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/main_halt.c

    re02d5dd9 rbac3d6d  
    2020#include "internal.h"
    2121
    22 static int rtems_shell_main_halt(
     22static int rtems_shell_main_shutdown(
    2323  int   argc __attribute__((unused)),
    2424  char *argv[] __attribute__((unused))
    2525)
    2626{
     27  fprintf(stdout, "System shutting down at user request\n");
    2728  exit(0);
    2829  return 0;
    2930}
    3031
    31 rtems_shell_cmd_t rtems_shell_HALT_Command = {
    32   "halt",                                    /* name */
    33   "halt",                                    /* usage */
     32rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command = {
     33  "shutdown",                                /* name */
     34  "shutdown",                                /* usage */
    3435  "rtems",                                   /* topic */
    35   rtems_shell_main_halt,                     /* command */
     36  rtems_shell_main_shutdown,                 /* command */
    3637  NULL,                                      /* alias */
    3738  NULL                                       /* next */
  • cpukit/libmisc/shell/shell.c

    re02d5dd9 rbac3d6d  
    892892            fprintf(stdout, "Shell exiting\n" );
    893893            break;
    894           } else if (!strcmp(cmds[cmd],"shutdown")) { /* exit application */
    895             fprintf(stdout, "System shutting down at user request\n" );
    896             exit(0);
    897894          }
    898895
  • cpukit/libmisc/shell/shellconfig.h

    re02d5dd9 rbac3d6d  
    7777extern rtems_shell_cmd_t rtems_shell_RTC_Command;
    7878
    79 extern rtems_shell_cmd_t rtems_shell_HALT_Command;
     79extern rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command;
    8080extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
    8181extern rtems_shell_cmd_t rtems_shell_TOP_Command;
     
    401401     */
    402402    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
    403          !defined(CONFIGURE_SHELL_NO_COMMAND_HALT)) || \
    404         defined(CONFIGURE_SHELL_COMMAND_HALT)
    405       &rtems_shell_HALT_Command,
     403         !defined(CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN)) || \
     404        defined(CONFIGURE_SHELL_COMMAND_SHUTDOWN)
     405      &rtems_shell_SHUTDOWN_Command,
    406406    #endif
    407407    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
  • doc/shell/rtems.t

    re02d5dd9 rbac3d6d  
    1212@itemize @bullet
    1313
    14 @item @code{halt} - Shutdown the system
     14@item @code{shutdown} - Shutdown the system
    1515@item @code{cpuuse} - print or reset per thread cpu usage
    1616@item @code{stackuse} - print per thread stack usage
     
    4343@c
    4444@page
    45 @subsection halt - Shutdown the system
    46 
    47 @pgindex halt
    48 
    49 @subheading SYNOPSYS:
    50 
    51 @example
    52 halt
     45@subsection shutdown - Shutdown the system
     46
     47@pgindex shutdown
     48
     49@subheading SYNOPSYS:
     50
     51@example
     52shutdown
    5353@end example
    5454
     
    6666@subheading EXAMPLES:
    6767
    68 The following is an example of how to use @code{halt}:
    69 
    70 @example
    71 SHLL [/] $ halt
     68The following is an example of how to use @code{shutdown}:
     69
     70@example
     71SHLL [/] $ shutdown
     72System shutting down at user request
    7273@end example
    7374
     
    7778@subheading CONFIGURATION:
    7879
    79 @findex CONFIGURE_SHELL_NO_COMMAND_HALT
    80 @findex CONFIGURE_SHELL_COMMAND_HALT
    81 
    82 This command is included in the default shell command set. 
    83 When building a custom command set, define
    84 @code{CONFIGURE_SHELL_COMMAND_HALT} to have this
    85 command included.
    86 
    87 This command can be excluded from the shell command set by
    88 defining @code{CONFIGURE_SHELL_NO_COMMAND_HALT} when all
    89 shell commands have been configured.
    90 
    91 @subheading PROGRAMMING INFORMATION:
    92 
    93 @findex rtems_shell_rtems_main_halt
    94 
    95 The @code{halt} is implemented by a C language function
    96 which has the following prototype:
    97 
    98 @example
    99 int rtems_shell_rtems_main_halt(
    100   int    argc,
    101   char **argv
    102 );
    103 @end example
    104 
    105 The configuration structure for the @code{halt} has the
    106 following prototype:
    107 
    108 @example
    109 extern rtems_shell_cmd_t rtems_shell_HALT_Command;
     80@findex CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN
     81@findex CONFIGURE_SHELL_COMMAND_SHUTDOWN
     82
     83This command is included in the default shell command set. 
     84When building a custom command set, define
     85@code{CONFIGURE_SHELL_COMMAND_SHUTDOWN} to have this
     86command included.
     87
     88This command can be excluded from the shell command set by
     89defining @code{CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN} when all
     90shell commands have been configured.
     91
     92@subheading PROGRAMMING INFORMATION:
     93
     94The configuration structure for the @code{shutdown} has the
     95following prototype:
     96
     97@example
     98extern rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command;
    11099@end example
    111100
Note: See TracChangeset for help on using the changeset viewer.