Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #945, shell implementation on posix and rtems #946

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/os/posix/src/os-impl-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "os-posix.h"
#include "os-impl-io.h"

#include "os-shared-file.h"
#include "os-shared-shell.h"
#include "os-shared-idmap.h"

Expand All @@ -60,7 +61,7 @@
int32 OS_ShellOutputToFile_Impl(const OS_object_token_t *token, const char *Cmd)
{
pid_t cpid;
uint32 local_id;
osal_index_t local_id;
int wstat;
const char * shell = getenv("SHELL");
OS_impl_file_internal_record_t *impl;
Expand Down Expand Up @@ -88,7 +89,7 @@ int32 OS_ShellOutputToFile_Impl(const OS_object_token_t *token, const char *Cmd)
/* close all _other_ filehandles */
for (local_id = 0; local_id < OS_MAX_NUM_OPEN_FILES; ++local_id)
{
if (OS_global_stream_table[local_id].active_id != 0)
if (OS_ObjectIdIsValid(OS_global_stream_table[local_id].active_id))
{
close(OS_impl_filehandle_table[local_id].fd);
}
Expand Down
13 changes: 4 additions & 9 deletions src/os/rtems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,10 @@ set(RTEMS_IMPL_SRCLIST
../portable/os-impl-posix-dirs.c
)

if (OSAL_CONFIG_INCLUDE_SHELL)
list(APPEND RTEMS_IMPL_SRCLIST
src/os-impl-shell.c
)
else ()
list(APPEND RTEMS_IMPL_SRCLIST
../portable/os-impl-no-shell.c
)
endif ()
# Currently the "shell output to file" for RTEMS is not implemented
list(APPEND RTEMS_IMPL_SRCLIST
../portable/os-impl-no-shell.c
)

# If some form of module loading is configured,
# then build the module loader
Expand Down
85 changes: 0 additions & 85 deletions src/os/rtems/src/os-impl-shell.c

This file was deleted.