From 609f4b4e7c7abb8d7f8f226f7ed11fcd515934b4 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 2 Jul 2020 08:46:30 -0400 Subject: [PATCH] Fix #752, use OS_READ_ONLY, not O_RDONLY Calls to OS_open() must use the OSAL-defined symbol, not the POSIX symbol. This was a long-standing bug but happened to work because they are both zero. --- fsw/cfe-core/src/es/cfe_es_apps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_apps.c b/fsw/cfe-core/src/es/cfe_es_apps.c index 442ce1d4e..abf4e929c 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.c +++ b/fsw/cfe-core/src/es/cfe_es_apps.c @@ -94,7 +94,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath ) /* ** Open the file in the volatile disk. */ - AppFile = OS_open( CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE, O_RDONLY, 0); + AppFile = OS_open( CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE, OS_READ_ONLY, 0); if ( AppFile >= 0 ) { @@ -119,7 +119,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath ) /* ** Try to Open the file passed in to the cFE start. */ - AppFile = OS_open( (const char *)StartFilePath, O_RDONLY, 0); + AppFile = OS_open( (const char *)StartFilePath, OS_READ_ONLY, 0); if ( AppFile >= 0 ) {