Skip to content

Commit

Permalink
Fix nasa#752, use OS_READ_ONLY, not O_RDONLY
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jphickey authored and Gerardo E. Cruz-Ortiz committed Jul 26, 2020
1 parent 03b5343 commit 609f4b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 )
{
Expand Down

0 comments on commit 609f4b4

Please sign in to comment.