source: rtems/cpukit/libmisc/shell/main_alias.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • 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.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_rtems_main_alias(int argc, char **argv)
24{
25  if (argc<3) {
26    fprintf(stderr,"too few arguments\n");
27    return 1;
28  }
29
30  if (!rtems_shell_alias_cmd(argv[1],argv[2])) {
31    fprintf(stderr,"unable to make an alias(%s,%s)\n",argv[1],argv[2]);
32  }
33  return 0;
34}
35
36rtems_shell_cmd_t rtems_shell_ALIAS_Command = {
37  "alias",                                /* name */
38  "alias old new",                        /* usage */
39  "misc",                                 /* topic */
40  rtems_shell_rtems_main_alias,           /* command */
41  NULL,                                   /* alias */
42  NULL                                    /* next */
43};
Note: See TracBrowser for help on using the repository browser.