source: rtems/cpukit/libmisc/shell/main_logoff.c @ f97536d

5
Last change on this file since f97536d was f97536d, checked in by Sebastian Huber <sebastian.huber@…>, on 10/16/15 at 06:21:48

basdefs.h: Add and use RTEMS_UNUSED

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  LOGOFF Shell Command Implmentation
3 *
4 *  Author: Fernando RUIZ CASAS
5 *  Work: fernando.ruiz@ctv.es
6 *  Home: correo@fernando-ruiz.com
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.org/license/LICENSE.
11 */
12
13#ifdef HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <stdio.h>
18
19#include <rtems.h>
20#include <rtems/shell.h>
21#include "internal.h"
22
23static int rtems_shell_main_logoff(
24  int   argc RTEMS_UNUSED,
25  char *argv[] RTEMS_UNUSED
26)
27{
28  rtems_shell_env_t *env = rtems_shell_get_current_env();
29
30  printf("logoff from the system...");
31
32  if (env)
33    env->exit_shell = true;
34
35  return 0;
36}
37
38rtems_shell_cmd_t rtems_shell_LOGOFF_Command = {
39  "logoff",                                  /* name */
40  "logoff from the system",                  /* usage */
41  "misc",                                    /* topic */
42  rtems_shell_main_logoff,                   /* command */
43  NULL,                                      /* alias */
44  NULL                                       /* next */
45};
Note: See TracBrowser for help on using the repository browser.