summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-12-04 09:39:44 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-12-04 09:39:44 +0000
commit26597fc19b9a29f62515915e7f762a80f0df39ff (patch)
treee5d51648a8fccfc6229e42861581373f514de0b2 /cpukit
parent2011-12-04 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-26597fc19b9a29f62515915e7f762a80f0df39ff.tar.bz2
2011-12-04 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/cat_file.c: #include <rtems/shell.h>. * libmisc/shell/filemode.c: #include "internal.h". * libmisc/shell/shell.h: Declare functions "extern".
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog3
-rw-r--r--cpukit/libmisc/shell/cat_file.c1
-rw-r--r--cpukit/libmisc/shell/filemode.c2
-rw-r--r--cpukit/libmisc/shell/shell.h34
4 files changed, 23 insertions, 17 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 3695d37513..acb8b89415 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,8 @@
2011-12-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * libmisc/shell/cat_file.c: #include <rtems/shell.h>.
+ * libmisc/shell/filemode.c: #include "internal.h".
+ * libmisc/shell/shell.h: Declare functions "extern".
* libmisc/shell/shell_cmdset.c: Remove superflous casts.
2011-12-03 Ralf Corsépius <ralf.corsepius@rtems.org>
diff --git a/cpukit/libmisc/shell/cat_file.c b/cpukit/libmisc/shell/cat_file.c
index 1a5efb4418..f2acccb963 100644
--- a/cpukit/libmisc/shell/cat_file.c
+++ b/cpukit/libmisc/shell/cat_file.c
@@ -17,6 +17,7 @@
#endif
#include <stdio.h>
+#include <rtems/shell.h>
int rtems_shell_cat_file(FILE * out,const char * name) {
FILE * fd;
diff --git a/cpukit/libmisc/shell/filemode.c b/cpukit/libmisc/shell/filemode.c
index 9a5d0440b4..a4f140b79e 100644
--- a/cpukit/libmisc/shell/filemode.c
+++ b/cpukit/libmisc/shell/filemode.c
@@ -41,6 +41,8 @@ __FBSDID("$FreeBSD: src/lib/libc/string/strmode.c,v 1.5 2007/01/09 00:28:12 imp
#include <sys/stat.h>
#include <string.h>
+#include "internal.h"
+
void
strmode(
mode_t mode,
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
index 8624161177..e7f63cfb75 100644
--- a/cpukit/libmisc/shell/shell.h
+++ b/cpukit/libmisc/shell/shell.h
@@ -60,14 +60,14 @@ typedef bool (*rtems_shell_login_check_t)(
const char * /* passphrase */
);
-bool rtems_shell_login_prompt(
+extern bool rtems_shell_login_prompt(
FILE *in,
FILE *out,
const char *device,
rtems_shell_login_check_t check
);
-bool rtems_shell_login_check(
+extern bool rtems_shell_login_check(
const char *user,
const char *passphrase
);
@@ -95,11 +95,11 @@ typedef struct {
* The return value has RTEMS_SHELL_KEYS_EXTENDED set if the key
* is extended, ie a special key.
*/
-unsigned int rtems_shell_getchar(FILE *in);
+extern unsigned int rtems_shell_getchar(FILE *in);
-rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd);
+extern rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd);
-rtems_shell_cmd_t *rtems_shell_add_cmd_struct(
+extern rtems_shell_cmd_t *rtems_shell_add_cmd_struct(
rtems_shell_cmd_t *shell_cmd
);
@@ -110,29 +110,29 @@ rtems_shell_cmd_t * rtems_shell_add_cmd(
rtems_shell_command_t command
);
-rtems_shell_cmd_t * rtems_shell_alias_cmd(
+extern rtems_shell_cmd_t * rtems_shell_alias_cmd(
const char *cmd,
const char *alias
);
-int rtems_shell_make_args(
+extern int rtems_shell_make_args(
char *commandLine,
int *argc_p,
char **argv_p,
int max_args
);
-int rtems_shell_cat_file(
+extern int rtems_shell_cat_file(
FILE *out,
const char *name
);
-void rtems_shell_write_file(
+extern void rtems_shell_write_file(
const char *name,
const char *content
);
-int rtems_shell_script_file(
+extern int rtems_shell_script_file(
int argc,
char **argv
);
@@ -149,7 +149,7 @@ int rtems_shell_script_file(
* @param login_check User login check function, NULL disables login checks.
*
*/
-rtems_status_code rtems_shell_init(
+extern rtems_status_code rtems_shell_init(
const char *task_name,
size_t task_stacksize,
rtems_task_priority task_priority,
@@ -172,7 +172,7 @@ rtems_status_code rtems_shell_init(
* Create if it does not exist.
* @param wait Wait for the script to finish.
*/
-rtems_status_code rtems_shell_script(
+extern rtems_status_code rtems_shell_script(
const char *task_name,
size_t task_stacksize, /* 0 default*/
rtems_task_priority task_priority,
@@ -250,7 +250,7 @@ struct rtems_shell_filesystems_tt {
* @note An application specific implementation can be provided
* by the user.
*/
-void rtems_shell_get_prompt(
+extern void rtems_shell_get_prompt(
rtems_shell_env_t *shell_env,
char *prompt,
size_t size
@@ -264,7 +264,7 @@ void rtems_shell_get_prompt(
* @param[in] fs The file system definition.
* @param[in] options Special file system options.
*/
-int rtems_shell_libc_mounter(
+extern int rtems_shell_libc_mounter(
const char* driver,
const char* path,
rtems_shell_filesystems_t* fs,
@@ -276,14 +276,14 @@ int rtems_shell_libc_mounter(
*
* @param[in] fs The file system mount data.
*/
-void rtems_shell_mount_add_fsys(rtems_shell_filesystems_t* fs);
+extern void rtems_shell_mount_add_fsys(rtems_shell_filesystems_t* fs);
/**
* Delete file system mount configuration from the mount command.
*
* @param[in] fs The file system mount data to remove.
*/
-void rtems_shell_mount_del_fsys(rtems_shell_filesystems_t* fs);
+extern void rtems_shell_mount_del_fsys(rtems_shell_filesystems_t* fs);
typedef void (*rtems_shell_wait_for_input_notification)(
int fd,
@@ -298,7 +298,7 @@ typedef void (*rtems_shell_wait_for_input_notification)(
* @retval RTEMS_TIMEOUT Timeout expired.
* @retval RTEMS_UNSATISFIED Cannot change or restore termios attributes.
*/
-rtems_status_code rtems_shell_wait_for_input(
+extern rtems_status_code rtems_shell_wait_for_input(
int fd,
int timeout_in_seconds,
rtems_shell_wait_for_input_notification notification,