Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:19

0001 /*
0002  *  Halt Command Implementation
0003  *
0004  *  COPYRIGHT (c) 1989-2008.
0005  *  On-Line Applications Research Corporation (OAR).
0006  *
0007  *  The license and distribution terms for this file may be
0008  *  found in the file LICENSE in this distribution or at
0009  *  http://www.rtems.org/license/LICENSE.
0010  */
0011 
0012 #ifdef HAVE_CONFIG_H
0013 #include "config.h"
0014 #endif
0015 
0016 #include <stdlib.h>
0017 
0018 #include <rtems.h>
0019 #include <rtems/shell.h>
0020 #include "internal.h"
0021 
0022 static int rtems_shell_main_shutdown(
0023   int   argc RTEMS_UNUSED,
0024   char *argv[] RTEMS_UNUSED
0025 )
0026 {
0027   fprintf(stdout, "System shutting down at user request\n");
0028   exit(0);
0029   return 0;
0030 }
0031 
0032 rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command = {
0033   "shutdown",                                /* name */
0034   "shutdown",                                /* usage */
0035   "rtems",                                   /* topic */
0036   rtems_shell_main_shutdown,                 /* command */
0037   NULL,                                      /* alias */
0038   NULL                                       /* next */
0039 };