nfs-ganesha 1.4
|
Internal routines for the shell. More...
#include "shell_types.h"
Go to the source code of this file.
Defines | |
#define | MAX_LINE_LEN 1024 |
#define | MAX_ARGS 256 |
#define | SHELL_SUCCESS 0 |
#define | SHELL_ERROR -1 |
#define | SHELL_NOT_FOUND -2 |
#define | SHELL_SYNTAX_ERROR -22 |
Functions | |
int | shell_Init (int verbose, char *input_file, char *prompt, int shell_index) |
int | shell_Launch () |
int | shell_BarrierInit (int nb_threads) |
int | shell_ParseLine (char *in_out_line, char **out_arglist, int *p_argcount) |
void | shell_CleanArgs (int argc, char **in_out_argv, int *in_allocated) |
int | shell_SolveArgs (int argc, char **in_out_argv, int *out_allocated) |
int | shell_Execute (int argc, char **argv, FILE *output) |
void | shell_PrintError (shell_state_t *context, char *error_msg) |
void | shell_PrintTrace (shell_state_t *context, char *msg) |
int | shell_SetLayer (shell_state_t *context, char *layer_name) |
layer_def_t * | shell_GetLayer (shell_state_t *context) |
int | shell_SetStatus (shell_state_t *context, int returned_status) |
int | shell_GetStatus (shell_state_t *context) |
int | shell_SetVerbose (shell_state_t *context, char *str_verbose) |
int | shell_GetVerbose (shell_state_t *context) |
int | shell_SetDbgLvl (shell_state_t *context, char *str_debug_level) |
int | shell_GetDbgLvl (shell_state_t *context) |
FILE * | shell_GetInputStream (shell_state_t *context) |
int | shell_SetInput (shell_state_t *context, char *file_name) |
int | shell_SetPrompt (shell_state_t *context, char *str_prompt) |
char * | shell_GetPrompt (shell_state_t *context) |
int | shell_SetShellId (shell_state_t *context, int shell_index) |
int | shell_SetLine (shell_state_t *context, int lineno) |
int | shell_GetLine (shell_state_t *context) |
int | shellcmd_help (int argc, char **argv, FILE *output) |
int | shellcmd_if (int argc, char **argv, FILE *output) |
int | shellcmd_interactive (int argc, char **argv, FILE *output) |
int | shellcmd_set (int argc, char **argv, FILE *output) |
int | shellcmd_unset (int argc, char **argv, FILE *output) |
int | shellcmd_print (int argc, char **argv, FILE *output) |
int | shellcmd_varlist (int argc, char **argv, FILE *output) |
int | shellcmd_time (int argc, char **argv, FILE *output) |
int | shellcmd_quit (int argc, char **argv, FILE *output) |
int | shellcmd_barrier (int argc, char **argv, FILE *output) |
Variables | |
char * | shell_special_vars [] |
Internal routines for the shell.
Revision 1.7 2006/02/23 07:42:53 leibovic Adding -n option to shell.
Revision 1.6 2005/07/26 12:54:47 leibovic Multi-thread shell with synchronisation routines.
Revision 1.5 2005/07/25 12:50:46 leibovic Adding thr_create and thr_join commands.
Revision 1.4 2005/05/27 12:01:48 leibovic Adding write command.
Revision 1.3 2005/05/11 15:53:37 leibovic Adding time function.
Revision 1.2 2005/05/09 14:54:59 leibovic Adding if.
Revision 1.1 2005/05/09 12:23:55 leibovic Version 2 of ganeshell.
Definition in file shell.h.
int shell_BarrierInit | ( | int | nb_threads | ) |
void shell_CleanArgs | ( | int | argc, |
char ** | in_out_argv, | ||
int * | in_allocated | ||
) |
shell_CleanArgs: Free allocated arguments.
argc | The number of command line tokens. |
in_out_argv | The list of command line tokens (modified). |
in_allocated | Indicates which tokens must be freed. |
shell_CleanArgs: Free allocated arguments.
argc | The number of command line tokens. |
in_out_argv | The list of command line tokens (modified). |
in_allocated | Indicates which tokens must be freed. |
int shell_Execute | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
shell_Execute: Execute a command.
argc | The number of arguments of this command. |
argv | The arguments for this command. |
output | The output stream of this command. |
shell_Execute: Commands dispatcher.
argc | The number of arguments of this command. |
argv | The arguments for this command. |
output | The output stream of this command. |
int shell_GetDbgLvl | ( | shell_state_t * | context | ) |
FILE* shell_GetInputStream | ( | shell_state_t * | context | ) |
layer_def_t* shell_GetLayer | ( | shell_state_t * | context | ) |
int shell_GetLine | ( | shell_state_t * | context | ) |
char* shell_GetPrompt | ( | shell_state_t * | context | ) |
int shell_GetStatus | ( | shell_state_t * | context | ) |
int shell_GetVerbose | ( | shell_state_t * | context | ) |
int shell_Init | ( | int | verbose, |
char * | input_file, | ||
char * | prompt, | ||
int | shell_index | ||
) |
int shell_Launch | ( | ) |
int shell_ParseLine | ( | char * | in_out_line, |
char ** | out_arglist, | ||
int * | p_argcount | ||
) |
void shell_PrintError | ( | shell_state_t * | context, |
char * | error_msg | ||
) |
void shell_PrintTrace | ( | shell_state_t * | context, |
char * | msg | ||
) |
int shell_SetDbgLvl | ( | shell_state_t * | context, |
char * | str_debug_level | ||
) |
int shell_SetInput | ( | shell_state_t * | context, |
char * | file_name | ||
) |
int shell_SetLayer | ( | shell_state_t * | context, |
char * | layer_name | ||
) |
int shell_SetLine | ( | shell_state_t * | context, |
int | lineno | ||
) |
int shell_SetPrompt | ( | shell_state_t * | context, |
char * | str_prompt | ||
) |
int shell_SetShellId | ( | shell_state_t * | context, |
int | shell_index | ||
) |
int shell_SetStatus | ( | shell_state_t * | context, |
int | returned_status | ||
) |
int shell_SetVerbose | ( | shell_state_t * | context, |
char * | str_verbose | ||
) |
int shell_SolveArgs | ( | int | argc, |
char ** | in_out_argv, | ||
int * | out_allocated | ||
) |
int shellcmd_barrier | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_help | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_interactive | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_print | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_quit | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_time | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_unset | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
int shellcmd_varlist | ( | int | argc, |
char ** | argv, | ||
FILE * | output | ||
) |
char* shell_special_vars[] |