Skip to content

Commit

Permalink
Merge pull request #53 from havencarlson/fix#52
Browse files Browse the repository at this point in the history
Fix #52, use CFE_FS_InitHeader() to initialize CFE header
  • Loading branch information
dzbaker authored Oct 3, 2022
2 parents 6ed4fc2 + b4a8e4c commit 52c6149
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fsw/src/fm_child.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,10 +1338,7 @@ bool FM_ChildDirListFileInit(osal_id_t *FileHandlePtr, const char *Directory, co
int32 Status = 0;

/* Initialize the standard cFE File Header for the Directory Listing File */
memset(&FileHeader, 0, sizeof(FileHeader));
FileHeader.SubType = FM_DIR_LIST_FILE_SUBTYPE;
strncpy(FileHeader.Description, CmdText, sizeof(FileHeader.Description) - 1);
FileHeader.Description[sizeof(FileHeader.Description) - 1] = '\0';
CFE_FS_InitHeader(&FileHeader, CmdText, FM_DIR_LIST_FILE_SUBTYPE);

/* Create directory listing output file */
Status = OS_OpenCreate(&FileHandle, Filename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE, OS_READ_WRITE);
Expand Down

0 comments on commit 52c6149

Please sign in to comment.