Desktop/xinu_mips-1.0.2.tar/xinu_mips-1.0.2/shell/shell.c File Reference

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

Include dependency graph for shell.c:

Go to the source code of this file.

Functions

process shell (ushort descrp)

Variables

struct centry commandtab []
ulong ncommand = sizeof( commandtab ) / sizeof( struct centry )


Detailed Description

shell

Id
shell.c 236 2007-07-12 23:21:31Z brylow

Definition in file shell.c.


Function Documentation

process shell ( ushort  descrp  ) 

The XINU shell. Provides an interface to execute commands.

Parameters:
descrp descriptor of device on which the shell is open
Returns:
OK for successful exit, SYSERR for unrecoverable error

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().


Variable Documentation

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     }
}
table of commands

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().


Generated on Thu Oct 9 22:34:52 2008 for xinu by  doxygen 1.5.5