source: rtems/cpukit/libmisc/shell/main_alias.c @ 183af89

4.115
Last change on this file since 183af89 was f1d9293e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/04/11 at 09:51:48

2011-12-04 Ralf Corsépius <ralf.corsepius@…>

  • libmisc/shell/cmds.c: Make rtems_shell_main_monitor static.
  • libmisc/shell/main_alias.c: Make rtems_shell_rtems_main_alias static.
  • libmisc/shell/main_blksync.c: Make rtems_shell_main_blksync static.
  • libmisc/shell/main_cat.c: Make rtems_shell_main_cat static.
  • libmisc/shell/main_chdir.c: Make rtems_shell_main_chdir static.
  • libmisc/shell/main_chmod.c: Make rtems_shell_main_chmod static.
  • libmisc/shell/main_chroot.c: Make rtems_shell_main_chroot static.
  • libmisc/shell/main_cp.c: Make rtems_shell_cp_exit, rtems_shell_main_cp static.
  • libmisc/shell/main_cpuuse.c: Make rtems_shell_main_cpuuse static.
  • libmisc/shell/main_date.c: Make rtems_shell_main_date static.
  • libmisc/shell/main_dd.c: Make rtems_shell_main_dd static.
  • libmisc/shell/main_echo.c: Make rtems_shell_main_echo static.
  • libmisc/shell/main_getenv.c: Make rtems_shell_main_getenv static.
  • libmisc/shell/main_halt.c: Make rtems_shell_main_halt static.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  ALIAS 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.com/license/LICENSE.
11 *
12 *  $Id$
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_rtems_main_alias(int argc, char **argv)
26{
27  if (argc<3) {
28    fprintf(stderr,"too few arguments\n");
29    return 1;
30  }
31
32  if (!rtems_shell_alias_cmd(argv[1],argv[2])) {
33    fprintf(stderr,"unable to make an alias(%s,%s)\n",argv[1],argv[2]);
34  }
35  return 0;
36}
37
38rtems_shell_cmd_t rtems_shell_ALIAS_Command = {
39  "alias",                                /* name */
40  "alias old new",                        /* usage */
41  "misc",                                 /* topic */
42  rtems_shell_rtems_main_alias,           /* command */
43  NULL,                                   /* alias */
44  NULL                                    /* next */
45};
Note: See TracBrowser for help on using the repository browser.