source: rtems/cpukit/libmisc/shell/main_halt.c @ bac3d6d

4.115
Last change on this file since bac3d6d was bac3d6d, checked in by Sebastian Huber <sebastian.huber@…>, on 11/17/14 at 14:42:57

shell: Rename HALT to SHUTDOWN command

Use a normal command for shutdown via exit().

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 *  Halt Command Implementation
3 *
4 *  COPYRIGHT (c) 1989-2008.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.org/license/LICENSE.
10 */
11
12#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <stdlib.h>
17
18#include <rtems.h>
19#include <rtems/shell.h>
20#include "internal.h"
21
22static int rtems_shell_main_shutdown(
23  int   argc __attribute__((unused)),
24  char *argv[] __attribute__((unused))
25)
26{
27  fprintf(stdout, "System shutting down at user request\n");
28  exit(0);
29  return 0;
30}
31
32rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command = {
33  "shutdown",                                /* name */
34  "shutdown",                                /* usage */
35  "rtems",                                   /* topic */
36  rtems_shell_main_shutdown,                 /* command */
37  NULL,                                      /* alias */
38  NULL                                       /* next */
39};
Note: See TracBrowser for help on using the repository browser.