From 3962c15f3bdf4bdb9dd07e454102c648814f4d8c Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 7 Apr 2021 14:43:38 +0000 Subject: [PATCH 1/3] Fix #932, Eliminate time and access name collisions with VxWorks --- src/os/inc/osapi-file.h | 16 ++++---- src/os/portable/os-impl-posix-files.c | 10 ++--- src/os/portable/os-impl-posix-gettime.c | 14 +++---- src/os/shared/inc/os-shared-file.h | 6 +-- src/os/shared/src/osapi-file.c | 10 ++--- .../portable/src/coveragetest-posix-files.c | 4 +- .../shared/src/coveragetest-file.c | 4 +- .../ut-stubs/src/osapi-file-impl-stubs.c | 7 ++-- .../osfile-test/ut_osfile_fileio_test.c | 37 ++----------------- src/ut-stubs/osapi-utstub-file.c | 8 ++-- 10 files changed, 43 insertions(+), 73 deletions(-) diff --git a/src/os/inc/osapi-file.h b/src/os/inc/osapi-file.h index 413515876..c9ad09b0e 100644 --- a/src/os/inc/osapi-file.h +++ b/src/os/inc/osapi-file.h @@ -125,16 +125,16 @@ typedef enum * of outputting the ID/descriptor separately from the return value, rather * than relying on the user to convert it back. * - * @param[out] filedes The handle ID (OS_OBJECT_ID_UNDEFINED on failure) - * @param[in] path File name to create or open - * @param[in] flags The file permissions - see @ref OS_file_flag_t - * @param[in] access Intended access mode - see @ref OSFileAccess + * @param[out] filedes The handle ID (OS_OBJECT_ID_UNDEFINED on failure) + * @param[in] path File name to create or open + * @param[in] flags The file permissions - see @ref OS_file_flag_t + * @param[in] access_mode Intended access mode - see @ref OSFileAccess * * @return Execution status, see @ref OSReturnCodes * @retval #OS_SUCCESS @copybrief OS_SUCCESS * @retval #OS_ERROR if the command was not executed properly */ -int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access); +int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access_mode); /*-------------------------------------------------------------------------------------*/ /** @@ -259,14 +259,14 @@ int32 OS_TimedWrite(osal_id_t filedes, const void *buffer, size_t nbytes, int32 /** * @brief Changes the permissions of a file * - * @param[in] path File to change - * @param[in] access Desired access mode - see @ref OSFileAccess + * @param[in] path File to change + * @param[in] access_mode Desired access mode - see @ref OSFileAccess * * @note Some file systems do not implement permissions * * @return Execution status, see @ref OSReturnCodes */ -int32 OS_chmod(const char *path, uint32 access); +int32 OS_chmod(const char *path, uint32 access_mode); /*-------------------------------------------------------------------------------------*/ /** diff --git a/src/os/portable/os-impl-posix-files.c b/src/os/portable/os-impl-posix-files.c index d97a205fa..52da3a36e 100644 --- a/src/os/portable/os-impl-posix-files.c +++ b/src/os/portable/os-impl-posix-files.c @@ -67,7 +67,7 @@ * See prototype for argument/return detail * *-----------------------------------------------------------------*/ -int32 OS_FileOpen_Impl(const OS_object_token_t *token, const char *local_path, int32 flags, int32 access) +int32 OS_FileOpen_Impl(const OS_object_token_t *token, const char *local_path, int32 flags, int32 access_mode) { int os_perm; int os_mode; @@ -79,7 +79,7 @@ int32 OS_FileOpen_Impl(const OS_object_token_t *token, const char *local_path, i ** Check for a valid access mode ** For creating a file, OS_READ_ONLY does not make sense */ - switch (access) + switch (access_mode) { case OS_WRITE_ONLY: os_perm = O_WRONLY; @@ -223,7 +223,7 @@ int32 OS_FileStat_Impl(const char *local_path, os_fstat_t *FileStats) * See prototype for argument/return detail * *-----------------------------------------------------------------*/ -int32 OS_FileChmod_Impl(const char *local_path, uint32 access) +int32 OS_FileChmod_Impl(const char *local_path, uint32 access_mode) { mode_t readbits; mode_t writebits; @@ -282,7 +282,7 @@ int32 OS_FileChmod_Impl(const char *local_path, uint32 access) writebits |= S_IWGRP; } - if (access == OS_WRITE_ONLY || access == OS_READ_WRITE) + if (access_mode == OS_WRITE_ONLY || access_mode == OS_READ_WRITE) { /* set all "write" mode bits */ st.st_mode |= writebits; @@ -293,7 +293,7 @@ int32 OS_FileChmod_Impl(const char *local_path, uint32 access) st.st_mode &= ~writebits; } - if (access == OS_READ_ONLY || access == OS_READ_WRITE) + if (access_mode == OS_READ_ONLY || access_mode == OS_READ_WRITE) { /* set all "read" mode bits */ st.st_mode |= readbits; diff --git a/src/os/portable/os-impl-posix-gettime.c b/src/os/portable/os-impl-posix-gettime.c index ddf59232f..a7d7cb9cd 100644 --- a/src/os/portable/os-impl-posix-gettime.c +++ b/src/os/portable/os-impl-posix-gettime.c @@ -67,13 +67,13 @@ int32 OS_GetLocalTime_Impl(OS_time_t *time_struct) { int Status; int32 ReturnCode; - struct timespec time; + struct timespec TimeSp; - Status = clock_gettime(OSAL_GETTIME_SOURCE_CLOCK, &time); + Status = clock_gettime(OSAL_GETTIME_SOURCE_CLOCK, &TimeSp); if (Status == 0) { - *time_struct = OS_TimeAssembleFromNanoseconds(time.tv_sec, time.tv_nsec); + *time_struct = OS_TimeAssembleFromNanoseconds(TimeSp.tv_sec, TimeSp.tv_nsec); ReturnCode = OS_SUCCESS; } else @@ -97,12 +97,12 @@ int32 OS_SetLocalTime_Impl(const OS_time_t *time_struct) { int Status; int32 ReturnCode; - struct timespec time; + struct timespec TimeSp; - time.tv_sec = OS_TimeGetTotalSeconds(*time_struct); - time.tv_nsec = OS_TimeGetNanosecondsPart(*time_struct); + TimeSp.tv_sec = OS_TimeGetTotalSeconds(*time_struct); + TimeSp.tv_nsec = OS_TimeGetNanosecondsPart(*time_struct); - Status = clock_settime(OSAL_GETTIME_SOURCE_CLOCK, &time); + Status = clock_settime(OSAL_GETTIME_SOURCE_CLOCK, &TimeSp); if (Status == 0) { diff --git a/src/os/shared/inc/os-shared-file.h b/src/os/shared/inc/os-shared-file.h index a3177f2d1..019787d5d 100644 --- a/src/os/shared/inc/os-shared-file.h +++ b/src/os/shared/inc/os-shared-file.h @@ -115,11 +115,11 @@ int32 OS_GenericClose_Impl(const OS_object_token_t *token); Function: OS_FileOpen_Impl Purpose: Opens the file indicated by "local_path" with permission - indicated by "access". + indicated by "access_mode". Returns: OS_SUCCESS on success, or relevant error code ------------------------------------------------------------------*/ -int32 OS_FileOpen_Impl(const OS_object_token_t *token, const char *local_path, int32 flags, int32 access); +int32 OS_FileOpen_Impl(const OS_object_token_t *token, const char *local_path, int32 flags, int32 access_mode); /*---------------------------------------------------------------- Function: OS_ShellOutputToFile_Impl @@ -181,7 +181,7 @@ int32 OS_FileRename_Impl(const char *old_path, const char *new_path); Returns: OS_SUCCESS on success, or relevant error code ------------------------------------------------------------------*/ -int32 OS_FileChmod_Impl(const char *local_path, uint32 access); +int32 OS_FileChmod_Impl(const char *local_path, uint32 access_mode); /* * Internal helper function diff --git a/src/os/shared/src/osapi-file.c b/src/os/shared/src/osapi-file.c index 57018ba1d..0e8a28bdb 100644 --- a/src/os/shared/src/osapi-file.c +++ b/src/os/shared/src/osapi-file.c @@ -110,7 +110,7 @@ int32 OS_FileAPI_Init(void) * See description in API and header file for detail * *-----------------------------------------------------------------*/ -int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access) +int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access_mode) { int32 return_code; char local_path[OS_MAX_LOCAL_PATH_LEN]; @@ -126,7 +126,7 @@ int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 acc /* ** Check for a valid access mode */ - if (access != OS_WRITE_ONLY && access != OS_READ_ONLY && access != OS_READ_WRITE) + if (access_mode != OS_WRITE_ONLY && access_mode != OS_READ_ONLY && access_mode != OS_READ_WRITE) { return OS_ERROR; } @@ -148,7 +148,7 @@ int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 acc OS_OBJECT_INIT(token, stream, stream_name, path); /* Now call the OS-specific implementation. */ - return_code = OS_FileOpen_Impl(&token, local_path, flags, access); + return_code = OS_FileOpen_Impl(&token, local_path, flags, access_mode); /* Check result, finalize record, and unlock global table. */ return_code = OS_ObjectIdFinalizeNew(return_code, &token, filedes); @@ -274,7 +274,7 @@ int32 OS_write(osal_id_t filedes, const void *buffer, size_t nbytes) * See description in API and header file for detail * *-----------------------------------------------------------------*/ -int32 OS_chmod(const char *path, uint32 access) +int32 OS_chmod(const char *path, uint32 access_mode) { char local_path[OS_MAX_LOCAL_PATH_LEN]; int32 return_code; @@ -282,7 +282,7 @@ int32 OS_chmod(const char *path, uint32 access) return_code = OS_TranslatePath(path, local_path); if (return_code == OS_SUCCESS) { - return_code = OS_FileChmod_Impl(local_path, access); + return_code = OS_FileChmod_Impl(local_path, access_mode); } return return_code; diff --git a/src/unit-test-coverage/portable/src/coveragetest-posix-files.c b/src/unit-test-coverage/portable/src/coveragetest-posix-files.c index 964348888..75d0c1e14 100644 --- a/src/unit-test-coverage/portable/src/coveragetest-posix-files.c +++ b/src/unit-test-coverage/portable/src/coveragetest-posix-files.c @@ -41,7 +41,7 @@ void Test_OS_FileOpen_Impl(void) { /* * Test Case For: - * int32 OS_FileOpen_Impl(uint32 local_id, const char *local_path, int32 flags, int32 access) + * int32 OS_FileOpen_Impl(uint32 local_id, const char *local_path, int32 flags, int32 access_mode) */ OS_object_token_t token; @@ -101,7 +101,7 @@ void Test_OS_FileChmod_Impl(void) { /* * Test Case For: - * int32 OS_FileChmod_Impl(const char *local_path, uint32 access) + * int32 OS_FileChmod_Impl(const char *local_path, uint32 access_mode) */ struct OCS_stat RefStat; diff --git a/src/unit-test-coverage/shared/src/coveragetest-file.c b/src/unit-test-coverage/shared/src/coveragetest-file.c index d4cafaeb1..7d819166e 100644 --- a/src/unit-test-coverage/shared/src/coveragetest-file.c +++ b/src/unit-test-coverage/shared/src/coveragetest-file.c @@ -52,7 +52,7 @@ void Test_OS_OpenCreate(void) { /* * Test Case For: - * int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access) + * int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access_mode) */ int32 expected; int32 actual; @@ -179,7 +179,7 @@ void Test_OS_chmod(void) { /* * Test Case For: - * int32 OS_chmod (const char *path, uint32 access) + * int32 OS_chmod (const char *path, uint32 access_mode) */ int32 expected = OS_SUCCESS; int32 actual = OS_chmod("/cf/file", 0); diff --git a/src/unit-test-coverage/ut-stubs/src/osapi-file-impl-stubs.c b/src/unit-test-coverage/ut-stubs/src/osapi-file-impl-stubs.c index e5f0d52f5..9dc13ff57 100644 --- a/src/unit-test-coverage/ut-stubs/src/osapi-file-impl-stubs.c +++ b/src/unit-test-coverage/ut-stubs/src/osapi-file-impl-stubs.c @@ -39,17 +39,18 @@ * File API abstraction layer */ -UT_DEFAULT_STUB(OS_FileOpen_Impl, (const OS_object_token_t *token, const char *local_path, int32 flags, int32 access)) +UT_DEFAULT_STUB(OS_FileOpen_Impl, + (const OS_object_token_t *token, const char *local_path, int32 flags, int32 access_mode)) UT_DEFAULT_STUB(OS_FileStat_Impl, (const char *local_path, os_fstat_t *filestat)) UT_DEFAULT_STUB(OS_FileRemove_Impl, (const char *local_path)) UT_DEFAULT_STUB(OS_FileRename_Impl, (const char *old_path, const char *new_path)) -UT_DEFAULT_STUB(OS_FileChmod_Impl, (const char *local_path, uint32 access)) +UT_DEFAULT_STUB(OS_FileChmod_Impl, (const char *local_path, uint32 access_mode)) UT_DEFAULT_STUB(OS_ShellOutputToFile_Impl, (const OS_object_token_t *token, const char *Cmd)) /* * Directory API abstraction layer */ -UT_DEFAULT_STUB(OS_DirCreate_Impl, (const char *local_path, uint32 access)) +UT_DEFAULT_STUB(OS_DirCreate_Impl, (const char *local_path, uint32 access_mode)) UT_DEFAULT_STUB(OS_DirOpen_Impl, (const OS_object_token_t *token, const char *local_path)) UT_DEFAULT_STUB(OS_DirClose_Impl, (const OS_object_token_t *token)) UT_DEFAULT_STUB(OS_DirRead_Impl, (const OS_object_token_t *token, os_dirent_t *dirent)) diff --git a/src/unit-tests/osfile-test/ut_osfile_fileio_test.c b/src/unit-tests/osfile-test/ut_osfile_fileio_test.c index df94fe0e2..149184c96 100644 --- a/src/unit-tests/osfile-test/ut_osfile_fileio_test.c +++ b/src/unit-tests/osfile-test/ut_osfile_fileio_test.c @@ -136,20 +136,7 @@ void UT_os_initfs_test() } /*--------------------------------------------------------------------------------* -** Syntax: int32 OS_creat(const char *path, int32 access) -** Purpose: Creates a file of a given name and access mode, if doesn't exist; -** then opens it -** Parameters: *path - pointer to the absolute path name of the file to be created -** access - access modes with which to open a file -** Returns: OS_INVALID_POINTER if the pointer passed in is null -** OS_FS_ERR_PATH_INVALID is the path passed in is invalid -** OS_FS_ERR_PATH_TOO_LONG if the absolute path name passed in is too long -** OS_FS_ERR_NAME_TOO_LONG if the file name passed in is too long -** OS_ERROR if the OS call failed or file access is invalid -** OS_FS_ERR_NO_FREE_IDS if there are no more free file descriptors left in -** the File Descriptor table -** A file descriptor value if succeeded -** OS_ERR_NOT_IMPLEMENTED if not implemented +** Purpose: Test OS_OpenCreate for creating files ** ----------------------------------------------------- ** Test #0: Not-implemented condition ** 1) Call this routine @@ -323,21 +310,7 @@ void UT_os_createfile_test() } /*--------------------------------------------------------------------------------* -** Syntax: int32 OS_open(const char *path, int32 access, uint32 mode) -** Purpose: Opens a file of a given name and access mode; if it doesn't exist, -** creates it first -** Parameters: *path - pointer to the absolute path name of the file to be created -** access - access modes with which to open a file -** mode - file permission which is not currently used -** Returns: OS_INVALID_POINTER if the pointer passed in is null -** OS_FS_ERR_PATH_INVALID is the path passed in is invalid -** OS_FS_ERR_PATH_TOO_LONG if the absolute path name passed in is too long -** OS_FS_ERR_NAME_TOO_LONG if the file name passed in is too long -** OS_ERROR if the OS call failed or file access is invalid -** OS_FS_ERR_NO_FREE_IDS if there are no more free file descriptors left in -** the File Descriptor table -** A file descriptor value if succeeded -** OS_ERR_NOT_IMPLEMENTED if not implemented +** Purpose: Tests OS_OpenCreate for opening files ** ----------------------------------------------------- ** Test #0: Not-implemented condition ** 1) Call this routine @@ -1129,11 +1102,7 @@ void UT_os_lseekfile_test() } /*--------------------------------------------------------------------------------* -** Syntax: int32 OS_chmod(const char *path, uint32 access) -** Purpose: Changes access mode of a given file name -** Parameters: *path - pointer to the path/name of the given file -** access - file access flags -** Returns: OS_ERR_NOT_IMPLEMENTED if not implemented +** Purpose: Test OS_chmod ** ----------------------------------------------------- ** Test #0: Not-implemented condition ** 1) Call this routine diff --git a/src/ut-stubs/osapi-utstub-file.c b/src/ut-stubs/osapi-utstub-file.c index 9fdc1f2c7..697e26afd 100644 --- a/src/ut-stubs/osapi-utstub-file.c +++ b/src/ut-stubs/osapi-utstub-file.c @@ -113,12 +113,12 @@ static int32 UT_GenericWriteStub(const char *fname, UT_EntryKey_t fkey, const vo * Stub function for OS_OpenCreate() * *****************************************************************************/ -int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access) +int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access_mode) { UT_Stub_RegisterContext(UT_KEY(OS_OpenCreate), filedes); UT_Stub_RegisterContext(UT_KEY(OS_OpenCreate), path); UT_Stub_RegisterContextGenericArg(UT_KEY(OS_OpenCreate), flags); - UT_Stub_RegisterContextGenericArg(UT_KEY(OS_OpenCreate), access); + UT_Stub_RegisterContextGenericArg(UT_KEY(OS_OpenCreate), access_mode); int32 status; status = UT_DEFAULT_IMPL(OS_OpenCreate); @@ -238,10 +238,10 @@ int32 OS_TimedWrite(osal_id_t filedes, const void *buffer, size_t nbytes, int32 * Stub function for OS_chmod() * *****************************************************************************/ -int32 OS_chmod(const char *path, uint32 access) +int32 OS_chmod(const char *path, uint32 access_mode) { UT_Stub_RegisterContext(UT_KEY(OS_chmod), path); - UT_Stub_RegisterContextGenericArg(UT_KEY(OS_chmod), access); + UT_Stub_RegisterContextGenericArg(UT_KEY(OS_chmod), access_mode); int32 Status; From 77102026fafc696e86f48aa07236f1a1a721c593 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 2 Apr 2021 17:37:28 -0400 Subject: [PATCH 2/3] Fix #945, shell implementation on posix and rtems Due to other changes the shell implementation on RTEMS and POSIX failed to build under certain configurations. This fixes and verifies the shell functions as expected. --- src/os/posix/src/os-impl-shell.c | 5 +- src/os/rtems/CMakeLists.txt | 13 ++--- src/os/rtems/src/os-impl-shell.c | 85 -------------------------------- 3 files changed, 7 insertions(+), 96 deletions(-) delete mode 100644 src/os/rtems/src/os-impl-shell.c diff --git a/src/os/posix/src/os-impl-shell.c b/src/os/posix/src/os-impl-shell.c index 445ae4d38..4b5d7cf23 100644 --- a/src/os/posix/src/os-impl-shell.c +++ b/src/os/posix/src/os-impl-shell.c @@ -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" @@ -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; @@ -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); } diff --git a/src/os/rtems/CMakeLists.txt b/src/os/rtems/CMakeLists.txt index 812ccaf6a..70d9c5947 100644 --- a/src/os/rtems/CMakeLists.txt +++ b/src/os/rtems/CMakeLists.txt @@ -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 diff --git a/src/os/rtems/src/os-impl-shell.c b/src/os/rtems/src/os-impl-shell.c deleted file mode 100644 index 7e2f775fb..000000000 --- a/src/os/rtems/src/os-impl-shell.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * NASA Docket No. GSC-18,370-1, and identified as "Operating System Abstraction Layer" - * - * Copyright (c) 2019 United States Government as represented by - * the Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * \file os-impl-shell.c - * \ingroup rtems - * \author joseph.p.hickey@nasa.gov - * - */ - -/**************************************************************************************** - INCLUDE FILES - ***************************************************************************************/ - -#include "os-rtems.h" -#include "os-impl-files.h" -#include "os-shared-shell.h" - -/**************************************************************************************** - DEFINES - ***************************************************************************************/ - -#define OS_REDIRECTSTRSIZE 15 - -/**************************************************************************************** - IMPLEMENTATION-SPECIFIC ROUTINES - These are specific to this particular operating system - ****************************************************************************************/ - -/*---------------------------------------------------------------- - * - * Function: OS_ShellOutputToFile_Impl - * - * Purpose: Implemented per internal OSAL API - * See prototype for argument/return detail - * - *-----------------------------------------------------------------*/ -int32 OS_ShellOutputToFile_Impl(uint32 file_id, const char *Cmd) -{ - /* - ** this is a #define to avoid a 'variable length array' warning - ** 15 is for the size of the redirection string that is added - ** to the command - */ - char LocalCmd[OS_MAX_CMD_LEN + OS_REDIRECTSTRSIZE]; - int32 Result; - - strncpy(LocalCmd, Cmd, OS_MAX_CMD_LEN + OS_REDIRECTSTRSIZE); - - /* Make sure that we are able to access this file */ - fchmod(OS_impl_filehandle_table[file_id].fd, 0666); - - /* - ** add in the extra chars necessary to perform the redirection - ** 1 for stdout and 2 for stderr. they are redirected to the - ** file descriptor passed in - */ - snprintf(LocalCmd, sizeof(LocalCmd), "%s 1>&%d 2>&%d", Cmd, OS_impl_filehandle_table[file_id].fd, - OS_impl_filehandle_table[file_id].fd); - - Result = system(LocalCmd); - - if (Result != 0) - { - return OS_ERROR; - } - return OS_SUCCESS; -} /* end OS_ShellOutputToFile_Impl */ From cafded04d8be5be2d87f5f7d8edd13244f78b83f Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Thu, 22 Apr 2021 09:33:21 -0400 Subject: [PATCH 3/3] IC:2021-04-20, Bump to v5.1.0-rc1+dev393 --- README.md | 6 ++++++ src/os/inc/osapi-version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4080f2f64..5dd1f2e7f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ The autogenerated OSAL user's guide can be viewed at and + ### Development Build: v5.1.0-rc1+dev387 - Replaces the separate "Initialized" and "Shutdown" flags with a single state flag. Creates a global single source of truth for the OSAL state. This enables users to run tests and OS_API_Init() multiple times without a reboot in the middle to reset the state. diff --git a/src/os/inc/osapi-version.h b/src/os/inc/osapi-version.h index e919eccd6..a81c861f1 100644 --- a/src/os/inc/osapi-version.h +++ b/src/os/inc/osapi-version.h @@ -34,7 +34,7 @@ /* * Development Build Macro Definitions */ -#define OS_BUILD_NUMBER 387 +#define OS_BUILD_NUMBER 393 #define OS_BUILD_BASELINE "v5.1.0-rc1" /*