summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-08-14 14:50:55 +1000
committerChris Johns <chrisj@rtems.org>2017-08-14 14:50:55 +1000
commit2465c0130b861c013afa44145e7d2019f05f2bc0 (patch)
tree794163361b1fd9449b533612786c091cdabe2e5a /cpukit/libmisc/shell/shell.h
parentarm: Use ARM code on Thumb 1 targets (diff)
downloadrtems-2465c0130b861c013afa44145e7d2019f05f2bc0.tar.bz2
libmisc/shell: Make some internal shell functions public.
- Add 'rtems_shell_init_environment()' so a user can create the shell environment without needing to run a shell. - Move 'rtems_shell_lookup_topic', 'rtems_shell_can_see_cmd', and 'rtems_shell_execute_cmd' from the internal interface to the public interface. Closes #3096.
Diffstat (limited to '')
-rw-r--r--cpukit/libmisc/shell/shell.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
index 4d545d6a41..98ddf0a958 100644
--- a/cpukit/libmisc/shell/shell.h
+++ b/cpukit/libmisc/shell/shell.h
@@ -94,6 +94,14 @@ typedef struct {
const char *alias;
} rtems_shell_alias_t;
+struct rtems_shell_topic_tt;
+typedef struct rtems_shell_topic_tt rtems_shell_topic_t;
+
+struct rtems_shell_topic_tt {
+ const char *topic;
+ rtems_shell_topic_t *next;
+};
+
/*
* The return value has RTEMS_SHELL_KEYS_EXTENDED set if the key
* is extended, ie a special key.
@@ -125,6 +133,26 @@ extern int rtems_shell_make_args(
int max_args
);
+extern rtems_shell_topic_t * rtems_shell_lookup_topic(
+ const char *topic
+);
+
+extern bool rtems_shell_can_see_cmd(
+ const rtems_shell_cmd_t *shell_cmd
+);
+
+extern int rtems_shell_execute_cmd(
+ const char *cmd, int argc, char *argv[]
+);
+
+/*
+ * Call to set up the shell environment if you need to execute commands before
+ * running a shell.
+ */
+extern void rtems_shell_init_environment(
+ void
+);
+
extern int rtems_shell_cat_file(
FILE *out,
const char *name