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

Last change on this file was 5f8c41c, checked in by Joel Sherrill <joel@…>, on 04/01/22 at 18:18:49

Update email address of Fernando Ruiz Casas to <fruizcasas@…>

This was requested to be executed prior to relicensing to BSD-2.

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