blob: d5209f6cd7cddd1065712aecc2b3254e93796921 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*
* BASED UPON SOURCE IN RTEMS, MODIFIED FOR SIMULATOR
*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef __SHELL_h
#define __SHELL_h
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*rtems_shell_command_t)(int argc, char **argv);
struct rtems_shell_cmd_tt;
typedef struct rtems_shell_cmd_tt rtems_shell_cmd_t;
struct rtems_shell_cmd_tt {
const char *name;
const char *usage;
const char *topic;
rtems_shell_command_t command;
rtems_shell_cmd_t *alias;
rtems_shell_cmd_t *next;
};
typedef struct {
const char *name;
const char *alias;
} rtems_shell_alias_t;
void rtems_shell_initialize_command_set(void);
rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd);
rtems_shell_cmd_t * rtems_shell_alias_cmd(
const char *cmd,
const char *alias
);
int rtems_shell_make_args(
char *commandLine,
int *argc_p,
char **argv_p,
int max_args
);
#ifdef __cplusplus
}
#endif
#endif
|