From 06f8e558b7fa2724ada5474074a6a3d1b93338c9 Mon Sep 17 00:00:00 2001 From: Thomas Doerfler Date: Fri, 27 Feb 2009 11:03:57 +0000 Subject: * libmisc/shell/shell.c, libmisc/shell/shell.h: Changed type for boolean values from 'int' to 'bool'. Added option 'login' to enable or disable a login prompt. Changed intialization of global shell environment to static initialization. Changed stack size type to 'size_t' conforming to classic API. * libmisc/shell/shellconfig.h: Fixed some typos. --- cpukit/libmisc/shell/shell.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'cpukit/libmisc/shell/shell.h') diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h index fa3ad00cc5..b1d589031c 100644 --- a/cpukit/libmisc/shell/shell.h +++ b/cpukit/libmisc/shell/shell.h @@ -134,16 +134,18 @@ int rtems_shell_script_file( * @param task_stacksize The size of the stack. If 0 the default size is used. * @param task_priority The priority the shell runs at. * @param forever Repeat logins. - * @param wait Caller should block until shell exits + * @param wait Caller should block until shell exits. + * @param login Demand user login. * */ rtems_status_code rtems_shell_init( const char *task_name, - uint32_t task_stacksize, /*0 default*/ + size_t task_stacksize, /* 0 default*/ rtems_task_priority task_priority, const char *devname, - int forever, - int wait + bool forever, + bool wait, + bool login ); /** @@ -161,13 +163,13 @@ rtems_status_code rtems_shell_init( */ rtems_status_code rtems_shell_script( const char *task_name, - uint32_t task_stacksize, /*0 default*/ + size_t task_stacksize, /* 0 default*/ rtems_task_priority task_priority, const char *input, const char *output, - int output_append, - int wait, - int echo + bool output_append, + bool wait, + bool echo ); /* @@ -184,12 +186,13 @@ typedef struct { bool exit_shell; /* logout */ bool forever ; /* repeat login */ int errorlevel; - int echo; + bool echo; char cwd[256]; const char* input; const char* output; - int output_append; + bool output_append; rtems_id wake_on_end; + bool login; } rtems_shell_env_t; bool rtems_shell_main_loop( -- cgit v1.2.3