Skip to content

Commit

Permalink
Merge pull request #575 from dmknutsen/issue_88
Browse files Browse the repository at this point in the history
Fix nasa#617, Updates comments to note that the length limit of OS_MAX_PATH_LEN and OS_MAX_API_NAME includes null terminator
  • Loading branch information
astrogeco authored Apr 21, 2020
2 parents 3b44a41 + f5e4c50 commit bd6707c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmake/sample_defs/default_osconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define OS_MAX_MUTEXES 20

/*
** Maximum length for an absolute path name
** Maximum length (including terminator) for an absolute path name
*/
#define OS_MAX_PATH_LEN 64

Expand All @@ -56,7 +56,7 @@
#define OS_MAX_LOCAL_PATH_LEN (OS_MAX_PATH_LEN + OS_FS_PHYS_NAME_LEN)

/*
** The maxium length allowed for a object (task,queue....) name
** The maxium length allowed for a object name (task, queue, etc.), including terminating null
*/
#define OS_MAX_API_NAME 20

Expand All @@ -66,7 +66,7 @@
#define OS_MAX_FILE_NAME 20

/*
** These defines are for OS_printf
** Buffer for OS_printf, includes terminator. Longer messages will be truncated
*/
#define OS_BUFFER_SIZE 172
#define OS_BUFFER_MSG_DEPTH 100
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/inc/cfe_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ int32 CFE_FS_GetUncompressedFile(char *OutputNameBuffer, uint32 OutputNameBuffer
** \par Assumptions, External Events, and Notes:
** -# The paths and filenames used here are the standard unix style
** filenames separated by "/" characters.
** -# The extracted filename is no longer than #OS_MAX_PATH_LEN
** -# The extracted filename (including terminator) is no longer than #OS_MAX_PATH_LEN
**
** \param[in] OriginalPath The original path.
** \param[out] FileNameOnly The filename that is extracted from the path.
Expand Down
3 changes: 2 additions & 1 deletion fsw/cfe-core/src/inc/cfe_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ typedef struct {
**
** \param[in] PipeName A string to be used to identify this pipe in error messages
** and routing information telemetry. The string must be no
** longer than #OS_MAX_API_NAME. Longer strings will be truncated.
** longer than #OS_MAX_API_NAME (including terminator).
** Longer strings will be truncated.
**
** \param[out] *PipeIdPtr The identifier for the created pipe.
**
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/inc/cfe_tbl_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
**
** -# The filename was misspelled
** -# The path to the file was incorrect
** -# The length of the filename and/or path exceeds the
** -# The length (including terminator) of the filename and/or path exceeds the
** allowable length (see #OS_MAX_PATH_LEN and #OS_MAX_FILE_NAME, respectively)
**
** The \c Status field in the event message indicates the error code returned by the #OS_open
Expand Down

0 comments on commit bd6707c

Please sign in to comment.