summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2007-12-03 02:22:35 +0000
committerChris Johns <chrisj@rtems.org>2007-12-03 02:22:35 +0000
commitdec8f84375aad9b4484169ca81a8b3248b377270 (patch)
treeac59749017b9d7e83aa14f29e3dc8bdfab372899 /cpukit
parent2007-12-03 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-dec8f84375aad9b4484169ca81a8b3248b377270.tar.bz2
2007-12-03 Chris Johns <chrisj@rtems.org>
* libmisc/shell/shell.h: Added comments for the parameters to the shell_init function. * libmisc/shell/shell.c: Only set cflags if tcflags is non-zero. This means the shell can use the current cflags settings and the application does not need to know the baudrate etc. * libmisc/capture/capture.h: Fix the comment.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog9
-rw-r--r--cpukit/libmisc/capture/capture.h2
-rw-r--r--cpukit/libmisc/shell/shell.c4
-rw-r--r--cpukit/libmisc/shell/shell.h15
4 files changed, 28 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 9d063cf1e2..c0dc235877 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,12 @@
+2007-12-03 Chris Johns <chrisj@rtems.org>
+
+ * libmisc/shell/shell.h: Added comments for the parameters to the
+ shell_init function.
+ * libmisc/shell/shell.c: Only set cflags if tcflags is
+ non-zero. This means the shell can use the current cflags settings
+ and the application does not need to know the baudrate etc.
+ * libmisc/capture/capture.h: Fix the comment.
+
2007-11-30 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/src/barrierdelete.c, rtems/src/barrierrelease.c,
diff --git a/cpukit/libmisc/capture/capture.h b/cpukit/libmisc/capture/capture.h
index 11b9835e93..558beaaa5d 100644
--- a/cpukit/libmisc/capture/capture.h
+++ b/cpukit/libmisc/capture/capture.h
@@ -121,7 +121,7 @@ typedef struct rtems_capture_control_s
RTEMS_CAPTURE_EXITTED)
/**
- * rtems_capture_control_t
+ * rtems_capture_task_t
*
* DESCRIPTION:
*
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index cd2dc7c899..6eff7adaae 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -599,7 +599,9 @@ rtems_boolean shell_shell_loop(
term.c_oflag &= ~OPOST;
term.c_oflag |= (OPOST|ONLCR); /* But with cr+nl on output */
term.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- term.c_cflag = CLOCAL | CREAD |(shell_env->tcflag);
+ if (shell_env->tcflag)
+ term.c_cflag = shell_env->tcflag;
+ term.c_cflag |= CLOCAL | CREAD;
term.c_cc[VMIN] = 1;
term.c_cc[VTIME] = 0;
if (tcsetattr (fileno(stdin), TCSADRAIN, &term) < 0) {
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
index 3cce16acb3..4e4cb96044 100644
--- a/cpukit/libmisc/shell/shell.h
+++ b/cpukit/libmisc/shell/shell.h
@@ -69,6 +69,21 @@ int shell_scanline(char * line,int size,FILE * in,FILE * out) ;
void cat_file(FILE * out,char *name);
void write_file(char *name,char * content);
+/**
+ * Initialise the shell creating tasks to login and run the shell
+ * sessions.
+ *
+ * @param task_name Name of the shell task.
+ * @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 tcflag The termios c_cflag value. If 0 the default is used, if
+ * not 0 the value is ORed with CLOCAL and CREAD.
+ * @param forever Repeat logins.
+ *
+ * @todo CCJ I am not sure this termios flag setting is a good idea. The shell
+ * needs to adjust the termios for its use but it should assume the
+ * settings are set by the user for things like baudrate etc.
+ */
rtems_status_code shell_init(
char *task_name,
uint32_t task_stacksize, /*0 default*/