From 6ef8a02a358787a8ccf85a2ec61441d0512b922b Mon Sep 17 00:00:00 2001 From: dmknutsen <52214567+dmknutsen@users.noreply.github.com> Date: Wed, 29 Apr 2020 18:22:29 -0400 Subject: [PATCH] Fix #623, Replace OS_FS_* return codes with common definitions (#624) Co-authored-by: Gerardo E. Cruz-Ortiz <59618057+astrogeco@users.noreply.github.com> --- fsw/cfe-core/src/es/cfe_es_apps.c | 2 +- fsw/cfe-core/src/es/cfe_es_shell.c | 18 +++++++++--------- fsw/cfe-core/src/es/cfe_es_start.c | 14 +++++++------- fsw/cfe-core/src/es/cfe_es_task.c | 2 +- fsw/cfe-core/src/evs/cfe_evs_log.c | 2 +- fsw/cfe-core/src/evs/cfe_evs_task.c | 2 +- fsw/cfe-core/src/fs/cfe_fs_api.c | 2 +- fsw/cfe-core/src/inc/cfe_error.h | 6 +++--- fsw/cfe-core/src/sb/cfe_sb_task.c | 6 +++--- fsw/cfe-core/src/tbl/cfe_tbl_internal.h | 6 +++--- fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c | 6 +++--- fsw/cfe-core/unit-test/es_UT.c | 6 +++--- fsw/cfe-core/unit-test/fs_UT.c | 14 +++++++------- fsw/cfe-core/unit-test/tbl_UT.c | 2 +- fsw/cfe-core/ut-stubs/ut_fs_stubs.c | 4 ++-- 15 files changed, 46 insertions(+), 46 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_apps.c b/fsw/cfe-core/src/es/cfe_es_apps.c index 0fe030b50..66fe5fe18 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.c +++ b/fsw/cfe-core/src/es/cfe_es_apps.c @@ -155,7 +155,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath ) while(1) { ReadStatus = OS_read(AppFile, &c, 1); - if ( ReadStatus == OS_FS_ERROR ) + if ( ReadStatus == OS_ERROR ) { CFE_ES_WriteToSysLog ("ES Startup: Error Reading Startup file. EC = 0x%08X\n",(unsigned int)ReadStatus); break; diff --git a/fsw/cfe-core/src/es/cfe_es_shell.c b/fsw/cfe-core/src/es/cfe_es_shell.c index 72a0ea1bc..adbe17e35 100644 --- a/fsw/cfe-core/src/es/cfe_es_shell.c +++ b/fsw/cfe-core/src/es/cfe_es_shell.c @@ -69,9 +69,9 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename) fd = OS_creat(Filename, OS_READ_WRITE); - if (fd < OS_FS_SUCCESS) + if (fd < OS_SUCCESS) { - Result = OS_FS_ERROR; + Result = OS_ERROR; } else @@ -113,11 +113,11 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename) /* seek to the end of the file to get it's size */ FileSize = OS_lseek(fd,0,OS_SEEK_END); - if (FileSize == OS_FS_ERROR) + if (FileSize == OS_ERROR) { OS_close(fd); CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 1\n"); - Result = OS_FS_ERROR; + Result = OS_ERROR; } @@ -153,11 +153,11 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename) /* seek to the end of the file again to get it's new size */ FileSize = OS_lseek(fd,0,OS_SEEK_END); - if (FileSize == OS_FS_ERROR) + if (FileSize == OS_ERROR) { OS_close(fd); CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 2\n"); - Result = OS_FS_ERROR; + Result = OS_ERROR; } @@ -210,9 +210,9 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename) /* Close the file descriptor */ OS_close(fd); - } /* if FilseSize == OS_FS_ERROR */ - } /* if FileSeize == OS_FS_ERROR */ - }/* if fd < OS_FS_SUCCESS */ + } /* if FilseSize == OS_ERROR */ + } /* if FileSeize == OS_ERROR */ + }/* if fd < OS_SUCCESS */ /* cppcheck-suppress duplicateExpression */ diff --git a/fsw/cfe-core/src/es/cfe_es_start.c b/fsw/cfe-core/src/es/cfe_es_start.c index 2cb6383ba..e1ccc24a9 100644 --- a/fsw/cfe-core/src/es/cfe_es_start.c +++ b/fsw/cfe-core/src/es/cfe_es_start.c @@ -540,7 +540,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType) if ( StartType == CFE_PSP_RST_TYPE_POWERON ) { RetStatus = OS_mkfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS ); - if ( RetStatus != OS_FS_SUCCESS ) + if ( RetStatus != OS_SUCCESS ) { CFE_ES_WriteToSysLog("ES Startup: Error Creating Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus); @@ -558,7 +558,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType) else { RetStatus = OS_initfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS ); - if ( RetStatus != OS_FS_SUCCESS ) + if ( RetStatus != OS_SUCCESS ) { CFE_ES_WriteToSysLog("ES Startup: Error Initializing Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus); CFE_ES_WriteToSysLog("ES Startup: Formatting Volatile(RAM) Volume.\n"); @@ -586,7 +586,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType) ** Now, mount the RAM disk */ RetStatus = OS_mount("/ramdev0", CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING); - if ( RetStatus != OS_FS_SUCCESS ) + if ( RetStatus != OS_SUCCESS ) { CFE_ES_WriteToSysLog("ES Startup: Error Mounting Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus); /* @@ -642,14 +642,14 @@ void CFE_ES_InitializeFileSystems(uint32 StartType) ** First, unmount the disk */ RetStatus = OS_unmount(CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING); - if ( RetStatus == OS_FS_SUCCESS ) + if ( RetStatus == OS_SUCCESS ) { /* ** Remove the file system from the OSAL */ RetStatus = OS_rmfs("/ramdev0"); - if ( RetStatus == OS_FS_SUCCESS ) + if ( RetStatus == OS_SUCCESS ) { /* @@ -658,13 +658,13 @@ void CFE_ES_InitializeFileSystems(uint32 StartType) RetStatus = OS_mkfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS ); - if ( RetStatus == OS_FS_SUCCESS ) + if ( RetStatus == OS_SUCCESS ) { /* ** Last, remount the disk */ RetStatus = OS_mount("/ramdev0", CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING); - if ( RetStatus != OS_FS_SUCCESS ) + if ( RetStatus != OS_SUCCESS ) { CFE_ES_WriteToSysLog("ES Startup: Error Re-Mounting Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus); /* diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/fsw/cfe-core/src/es/cfe_es_task.c index b04813991..2f750536e 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.c +++ b/fsw/cfe-core/src/es/cfe_es_task.c @@ -1894,7 +1894,7 @@ int32 CFE_ES_DumpCDSRegistryCmd(const CFE_ES_DumpCDSRegistry_t *data) /* Create a new dump file, overwriting anything that may have existed previously */ FileDescriptor = OS_creat(DumpFilename, OS_WRITE_ONLY); - if (FileDescriptor >= OS_FS_SUCCESS) + if (FileDescriptor >= OS_SUCCESS) { /* Initialize the standard cFE File Header for the Dump File */ CFE_FS_InitHeader(&StdFileHeader, "CDS_Registry", CFE_FS_SubType_ES_CDS_REG); diff --git a/fsw/cfe-core/src/evs/cfe_evs_log.c b/fsw/cfe-core/src/evs/cfe_evs_log.c index ae90d0d7d..20751edc7 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_log.c +++ b/fsw/cfe-core/src/evs/cfe_evs_log.c @@ -174,7 +174,7 @@ int32 CFE_EVS_WriteLogDataFileCmd(const CFE_EVS_WriteLogDataFile_t *data) /* Create the log file */ LogFileHandle = OS_creat(LogFilename, OS_WRITE_ONLY); - if (LogFileHandle < OS_FS_SUCCESS) + if (LogFileHandle < OS_SUCCESS) { EVS_SendEvent(CFE_EVS_ERR_CRLOGFILE_EID, CFE_EVS_EventType_ERROR, "Write Log File Command Error: OS_creat = 0x%08X, filename = %s", diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.c b/fsw/cfe-core/src/evs/cfe_evs_task.c index 22ad6a2d0..fb0721a18 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.c +++ b/fsw/cfe-core/src/evs/cfe_evs_task.c @@ -1753,7 +1753,7 @@ int32 CFE_EVS_WriteAppDataFileCmd(const CFE_EVS_WriteAppDataFile_t *data) /* Create Application Data File */ FileHandle = OS_creat(LocalName, OS_WRITE_ONLY); - if (FileHandle < OS_FS_SUCCESS) + if (FileHandle < OS_SUCCESS) { EVS_SendEvent(CFE_EVS_ERR_CRDATFILE_EID, CFE_EVS_EventType_ERROR, "Write App Data Command Error: OS_creat = 0x%08X, filename = %s", diff --git a/fsw/cfe-core/src/fs/cfe_fs_api.c b/fsw/cfe-core/src/fs/cfe_fs_api.c index 1c991ffeb..56f792350 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_api.c +++ b/fsw/cfe-core/src/fs/cfe_fs_api.c @@ -191,7 +191,7 @@ int32 CFE_FS_SetTimestamp(int32 FileDes, CFE_TIME_SysTime_t NewTimestamp) if (Result == sizeof(OutTimestamp.Subseconds)) { - Result = OS_FS_SUCCESS; + Result = OS_SUCCESS; } else { diff --git a/fsw/cfe-core/src/inc/cfe_error.h b/fsw/cfe-core/src/inc/cfe_error.h index e5ce58e2e..0e93b4a34 100644 --- a/fsw/cfe-core/src/inc/cfe_error.h +++ b/fsw/cfe-core/src/inc/cfe_error.h @@ -807,12 +807,12 @@ #define CFE_OS_ERR_NAME_NOT_FOUND (OS_ERR_NAME_NOT_FOUND) /**< @brief DEPRECATED @deprecated */ #define CFE_OS_ERR_SEM_NOT_FULL (OS_ERR_SEM_NOT_FULL) /**< @brief DEPRECATED @deprecated */ #define CFE_OS_ERR_INVALID_PRIORITY (OS_ERR_INVALID_PRIORITY) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERROR (OS_FS_ERROR) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERR_INVALID_POINTER (OS_FS_ERR_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */ +#define CFE_OS_FS_ERROR (OS_ERROR) /**< @brief DEPRECATED @deprecated */ +#define CFE_OS_FS_ERR_INVALID_POINTER (OS_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */ #define CFE_OS_FS_ERR_PATH_TOO_LONG (OS_FS_ERR_PATH_TOO_LONG) /**< @brief DEPRECATED @deprecated */ #define CFE_OS_FS_ERR_NAME_TOO_LONG (OS_FS_ERR_NAME_TOO_LONG) /**< @brief DEPRECATED @deprecated */ #define CFE_OS_FS_ERR_DRIVE_NOT_CREATED (OS_FS_ERR_DRIVE_NOT_CREATED) /**< @brief DEPRECATED @deprecated */ -#define CFE_OSAPI_NOT_IMPLEMENTED (OS_FS_UNIMPLEMENTED) /**< @brief DEPRECATED @deprecated */ +#define CFE_OSAPI_NOT_IMPLEMENTED (OS_ERR_NOT_IMPLEMENTED) /**< @brief DEPRECATED @deprecated */ #endif /* CFE_OMIT_DEPRECATED_6_7 */ diff --git a/fsw/cfe-core/src/sb/cfe_sb_task.c b/fsw/cfe-core/src/sb/cfe_sb_task.c index 88e4cece2..9bb69d014 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_task.c +++ b/fsw/cfe-core/src/sb/cfe_sb_task.c @@ -854,7 +854,7 @@ int32 CFE_SB_SendRtgInfo(const char *Filename) CFE_SB_DestinationD_t *DestPtr; fd = OS_creat(Filename, OS_WRITE_ONLY); - if(fd < OS_FS_SUCCESS){ + if(fd < OS_SUCCESS){ CFE_EVS_SendEvent(CFE_SB_SND_RTG_ERR1_EID,CFE_EVS_EventType_ERROR, "Error creating file %s, stat=0x%x", Filename,(unsigned int)fd); @@ -964,7 +964,7 @@ int32 CFE_SB_SendPipeInfo(const char *Filename) fd = OS_creat(Filename, OS_WRITE_ONLY); - if(fd < OS_FS_SUCCESS){ + if(fd < OS_SUCCESS){ CFE_EVS_SendEvent(CFE_SB_SND_RTG_ERR1_EID,CFE_EVS_EventType_ERROR, "Error creating file %s, stat=0x%x", Filename,(unsigned int)fd); @@ -1039,7 +1039,7 @@ int32 CFE_SB_SendMapInfo(const char *Filename) fd = OS_creat(Filename, OS_WRITE_ONLY); - if (fd < OS_FS_SUCCESS){ + if (fd < OS_SUCCESS){ CFE_EVS_SendEvent(CFE_SB_SND_RTG_ERR1_EID,CFE_EVS_EventType_ERROR, "Error creating file %s, stat=0x%x", Filename,(unsigned int)fd); diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.h b/fsw/cfe-core/src/tbl/cfe_tbl_internal.h index 2e29002da..b09bb54a3 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.h +++ b/fsw/cfe-core/src/tbl/cfe_tbl_internal.h @@ -380,12 +380,12 @@ int32 CFE_TBL_GetWorkingBuffer(CFE_TBL_LoadBuff_t **WorkingBufferPtr, ** of table image file to be loaded ** ** \retval #CFE_SUCCESS \copydoc CFE_SUCCESS -** \retval #OS_FS_ERR_INVALID_POINTER \copydoc OS_FS_ERR_INVALID_POINTER +** \retval #OS_INVALID_POINTER \copydoc OS_INVALID_POINTER ** \retval #OS_FS_ERR_PATH_TOO_LONG \copydoc OS_FS_ERR_PATH_TOO_LONG ** \retval #OS_FS_ERR_PATH_INVALID \copydoc OS_FS_ERR_PATH_INVALID ** \retval #OS_FS_ERR_NAME_TOO_LONG \copydoc OS_FS_ERR_NAME_TOO_LONG -** \retval #OS_FS_ERR_NO_FREE_FDS \copydoc OS_FS_ERR_NO_FREE_FDS -** \retval #OS_FS_ERROR \copydoc OS_FS_ERROR +** \retval #OS_ERR_NO_FREE_IDS \copydoc OS_ERR_NO_FREE_IDS +** \retval #OS_ERROR \copydoc OS_ERROR ** \retval #CFE_TBL_ERR_FILE_TOO_LARGE \copydoc CFE_TBL_ERR_FILE_TOO_LARGE ** \retval #CFE_TBL_WARN_SHORT_FILE \copydoc CFE_TBL_WARN_SHORT_FILE ** \retval #CFE_TBL_WARN_PARTIAL_LOAD \copydoc CFE_TBL_WARN_PARTIAL_LOAD diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c index e697ce72d..421ddbd7c 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c @@ -119,7 +119,7 @@ int32 CFE_TBL_HousekeepingCmd(const CCSDS_CommandPacket_t *data) { Status = CFE_FS_SetTimestamp(FileDescriptor, DumpTime); - if (Status != OS_FS_SUCCESS) + if (Status != OS_SUCCESS) { CFE_ES_WriteToSysLog("CFE_TBL:HkCmd-Unable to update timestamp in dump file '%s'\n", DumpCtrlPtr->DumpBufferPtr->DataSource); @@ -757,7 +757,7 @@ CFE_TBL_CmdProcRet_t CFE_TBL_DumpToFile( const char *DumpFilename, const char *T /* Create a new dump file, overwriting anything that may have existed previously */ FileDescriptor = OS_creat(DumpFilename, OS_WRITE_ONLY); - if (FileDescriptor >= OS_FS_SUCCESS) + if (FileDescriptor >= OS_SUCCESS) { /* Initialize the standard cFE File Header for the Dump File */ CFE_FS_InitHeader(&StdFileHeader, "Table Dump Image", CFE_FS_SubType_TBL_IMG); @@ -1147,7 +1147,7 @@ int32 CFE_TBL_DumpRegistryCmd(const CFE_TBL_DumpRegistry_t *data) /* Create a new dump file, overwriting anything that may have existed previously */ FileDescriptor = OS_creat(DumpFilename, OS_WRITE_ONLY); - if (FileDescriptor >= OS_FS_SUCCESS) + if (FileDescriptor >= OS_SUCCESS) { /* Initialize the standard cFE File Header for the Dump File */ CFE_FS_InitHeader(&StdFileHeader, "Table Registry", CFE_FS_SubType_TBL_REG); diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index ac7608c8d..e0a7a7ab3 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -3068,7 +3068,7 @@ void TestTask(void) /* Test write of all app data to file with a write header failure */ ES_ResetUnitTest(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_FS_ERROR); + UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_ERROR); UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CFE_ES_QueryAll_t), UT_TPID_CFE_ES_CMD_QUERY_ALL_CC); UT_Report(__FILE__, __LINE__, @@ -3245,7 +3245,7 @@ void TestTask(void) /* Test writing the system log with a write header failure */ ES_ResetUnitTest(); - UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_FS_ERROR); + UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_ERROR); UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CFE_ES_WriteSyslog_t), UT_TPID_CFE_ES_CMD_WRITE_SYSLOG_CC); UT_Report(__FILE__, __LINE__, @@ -3304,7 +3304,7 @@ void TestTask(void) /* Test writing the E&R log with a write header failure */ ES_ResetUnitTest(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_FS_ERROR); + UT_SetDeferredRetcode(UT_KEY(CFE_FS_WriteHeader), 1, OS_ERROR); UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CFE_ES_WriteERLog_t), UT_TPID_CFE_ES_CMD_WRITE_ER_LOG_CC); UT_Report(__FILE__, __LINE__, diff --git a/fsw/cfe-core/unit-test/fs_UT.c b/fsw/cfe-core/unit-test/fs_UT.c index e24754f52..3993bed71 100644 --- a/fsw/cfe-core/unit-test/fs_UT.c +++ b/fsw/cfe-core/unit-test/fs_UT.c @@ -112,7 +112,7 @@ void Test_CFE_FS_ReadHeader(void) /* Test successfully reading the header */ UT_InitData(); - UT_SetDeferredRetcode(UT_KEY(OS_lseek), 1, OS_FS_SUCCESS); + UT_SetDeferredRetcode(UT_KEY(OS_lseek), 1, OS_SUCCESS); UT_SetForceFail(UT_KEY(OS_read), OS_ERROR); UT_Report(__FILE__, __LINE__, CFE_FS_ReadHeader(&Hdr, FileDes) != sizeof(CFE_FS_Header_t), @@ -142,10 +142,10 @@ void Test_CFE_FS_WriteHeader(void) /* Test successfully writing the header */ UT_InitData(); - UT_SetDeferredRetcode(UT_KEY(OS_lseek), 1, OS_FS_SUCCESS); - UT_SetDeferredRetcode(UT_KEY(OS_write), 1, OS_FS_SUCCESS); + UT_SetDeferredRetcode(UT_KEY(OS_lseek), 1, OS_SUCCESS); + UT_SetDeferredRetcode(UT_KEY(OS_write), 1, OS_SUCCESS); UT_Report(__FILE__, __LINE__, - CFE_FS_WriteHeader(FileDes, &Hdr) == OS_FS_SUCCESS, + CFE_FS_WriteHeader(FileDes, &Hdr) == OS_SUCCESS, "CFE_FS_WriteHeader", "Header write - successful"); } @@ -166,7 +166,7 @@ void Test_CFE_FS_SetTimestamp(void) UT_InitData(); UT_SetForceFail(UT_KEY(OS_lseek), OS_ERROR); UT_Report(__FILE__, __LINE__, - CFE_FS_SetTimestamp(FileDes, NewTimestamp) == OS_FS_ERROR, + CFE_FS_SetTimestamp(FileDes, NewTimestamp) == OS_ERROR, "CFE_FS_SetTimestamp", "Failed to lseek time fields"); @@ -189,7 +189,7 @@ void Test_CFE_FS_SetTimestamp(void) /* Test successfully setting the time stamp */ UT_InitData(); UT_Report(__FILE__, __LINE__, - CFE_FS_SetTimestamp(FileDes, NewTimestamp) == OS_FS_SUCCESS, + CFE_FS_SetTimestamp(FileDes, NewTimestamp) == OS_SUCCESS, "CFE_FS_SetTimestamp", "Write time stamp - successful"); } @@ -506,7 +506,7 @@ void Test_CFE_FS_Decompress(void) /* Test filling the input buffer with a FS error */ UT_InitData(); UT_SetDeferredRetcode(UT_KEY(OS_read), 1, 4); - UT_SetDeferredRetcode(UT_KEY(OS_read), 1, OS_FS_ERROR); + UT_SetDeferredRetcode(UT_KEY(OS_read), 1, OS_ERROR); UT_Report(__FILE__, __LINE__, FS_gz_fill_inbuf_Reentrant(&UT_FS_Decompress_State) == EOF, "FS_gz_fill_inbuf", diff --git a/fsw/cfe-core/unit-test/tbl_UT.c b/fsw/cfe-core/unit-test/tbl_UT.c index f1fe98824..4164d8bd4 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.c +++ b/fsw/cfe-core/unit-test/tbl_UT.c @@ -1761,7 +1761,7 @@ void Test_CFE_TBL_HousekeepingCmd(void) /* Test response to a file time stamp failure */ UT_InitData(); CFE_TBL_TaskData.DumpControlBlocks[0].State = CFE_TBL_DUMP_PERFORMED; - UT_SetDeferredRetcode(UT_KEY(CFE_FS_SetTimestamp), 1, OS_FS_SUCCESS - 1); + UT_SetDeferredRetcode(UT_KEY(CFE_FS_SetTimestamp), 1, OS_SUCCESS - 1); UT_Report(__FILE__, __LINE__, CFE_TBL_HousekeepingCmd(NULL) == CFE_TBL_DONT_INC_CTR, "CFE_TBL_HousekeepingCmd", diff --git a/fsw/cfe-core/ut-stubs/ut_fs_stubs.c b/fsw/cfe-core/ut-stubs/ut_fs_stubs.c index 6c7df8335..3b553fa42 100644 --- a/fsw/cfe-core/ut-stubs/ut_fs_stubs.c +++ b/fsw/cfe-core/ut-stubs/ut_fs_stubs.c @@ -146,13 +146,13 @@ int32 CFE_FS_ReadHeader(CFE_FS_Header_t *Hdr, int32 FileDes) ** being called. If the value FSSetTimestampRtn.count is greater than ** zero then the counter is decremented; if it then equals zero the ** return value is set to the user-defined value -** FSSetTimestampRtn.value. OS_FS_SUCCESS is returned otherwise. +** FSSetTimestampRtn.value. OS_SUCCESS is returned otherwise. ** ** \par Assumptions, External Events, and Notes: ** None ** ** \returns -** Returns either a user-defined status flag or OS_FS_SUCCESS. +** Returns either a user-defined status flag or OS_SUCCESS. ** ******************************************************************************/ int32 CFE_FS_SetTimestamp(int32 FileDes, CFE_TIME_SysTime_t NewTimestamp)