#include <kernel.h>#include <shell.h>#include <stdio.h>#include <string.h>#include <tty.h>#include <proc.h>

Go to the source code of this file.
Functions | |
| process | shell (ushort descrp) |
Variables | |
| struct centry | commandtab [] |
| ulong | ncommand = sizeof( commandtab ) / sizeof( struct centry ) |
Definition in file shell.c.
| process shell | ( | ushort | descrp | ) |
The XINU shell. Provides an interface to execute commands.
| descrp | descriptor of device on which the shell is open |
Definition at line 40 of file shell.c.
References centry::builtin, control(), create(), FALSE, fprintf(), lexan(), centry::name, ncommand, NULL, OK, centry::procedure, read(), ready(), receive(), RESCHED_NO, RESCHED_YES, SHELL_BANNER, SHELL_BUFLEN, SHELL_CHILDERR, SHELL_CMDPRIO, SHELL_CMDSTK, SHELL_EXIT, SHELL_MAXTOK, SHELL_PROMPT, SHELL_START, SHELL_SYNTAXERR, sleep(), strcmp(), syscall, SYSERR, TRUE, TTY_IFLAG_ECHO, TTY_IOC_CBREAK, TTY_IOC_EOF, and TTY_IOC_SETIFLAG.
Referenced by main().
| struct centry commandtab[] |
Initial value:
{
{ "exit", TRUE, xsh_exit },
{ "kill", TRUE, xsh_kill },
{ "sleep", TRUE, xsh_sleep },
{ "gpiostat", FALSE, xsh_gpiostat },
{ "help", FALSE, xsh_help },
{ "led", FALSE, xsh_led },
{ "memstat", FALSE, xsh_memstat },
{ "ps", FALSE, xsh_ps },
{ "reset", FALSE, xsh_reset },
{ "uartstat", FALSE, xsh_uartstat },
{ "?", FALSE, xsh_help },
{ "testsuite", TRUE, xsh_testsuite },
{ "test", FALSE, xsh_test }
}
Definition at line 16 of file shell.c.
Referenced by xsh_help().
| ulong ncommand = sizeof( commandtab ) / sizeof( struct centry ) |
number of commands in table
Definition at line 33 of file shell.c.
Referenced by shell(), and xsh_help().
1.5.5