summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-04-06 08:36:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-04-06 16:26:52 +0200
commit3407a3b1bcc2f673165e129bb1e44f9ca94a268f (patch)
tree25aee458b42b444d53d1193fcce906267c99ede9 /cpukit/libmisc
parentshell: Simplify rtems_shell_dup_current_env() (diff)
downloadrtems-3407a3b1bcc2f673165e129bb1e44f9ca94a268f.tar.bz2
shell: Add and use SHELL_MAGIC
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/shell/shell.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 994c2ec6e9..090277c57c 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -49,8 +49,10 @@
#define shell_std_debug(...)
#endif
+#define SHELL_MAGIC rtems_build_name('S', 'E', 'N', 'V')
+
const rtems_shell_env_t rtems_global_shell_env = {
- .magic = rtems_build_name('S', 'E', 'N', 'V'),
+ .magic = SHELL_MAGIC,
.managed = false,
.devname = CONSOLE_DEVICE_NAME,
.taskname = "RTSH",
@@ -1020,7 +1022,7 @@ bool rtems_shell_main_loop(
rtems_shell_init_environment();
- if (shell_env->magic != rtems_build_name('S', 'E', 'N', 'V')) {
+ if (shell_env->magic != SHELL_MAGIC) {
rtems_error(0, "invalid shell environment passed to the main loop)");
return false;
}
@@ -1171,7 +1173,7 @@ static rtems_status_code rtems_shell_run (
name = rtems_build_name(
task_name[0], task_name[1], task_name[2], task_name[3]);
else
- name = rtems_build_name( 'S', 'E', 'N', 'V' );
+ name = SHELL_MAGIC;
sc = rtems_task_create(
name,