-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement InitHeader call in CFE FS #37
Comments
Imported from trac issue 6. Created by jphickey on 2014-12-24T08:51:08, last modified: 2019-03-05T14:57:55 |
Trac comment by jphickey on 2014-12-24 11:14:18: Pushed commit [changeset:de8f127] to address this. NOTE: In several instances this change also fixes possible uninitialized data bug(s): the file header was allocated on the stack but not necessarily memset() before writing it to the file. The description and subtype were set, but other fields might have uninitialized data. |
Trac comment by jphickey on 2015-04-06 11:22:20: This is ready for review/merge |
Trac comment by acudmore on 2015-04-06 14:03:55: recommend accept |
Trac comment by jwilmot on 2015-04-06 15:17:42: Should the Init header function return an error code? What if the string is to long? How would an app add non-common header metadata like a version or CRC? |
Trac comment by jphickey on 2015-04-06 15:46:57: We can easily modify the API to return an int32 and do the length check, but we just need to consider:
For the case of non-common header data, the callers are still free to modify the structure after this call returns, just as they always have done. This only replaces the bits of initialization that were consistent everywhere. It also creates a nice place for future additions of things that need to be everywhere (such as the signature of EDS in use describing the binary format). |
Trac comment by glimes on 2015-04-07 12:47:34: Tested changeset [changeset:de8f127] as part of the ic-2015-03-10 merge. |
Trac comment by sstrege on 2015-04-07 13:25:39: CCB - Agree to move this change forward and open a new ticket to handle error/length conditions |
Trac comment by glimes on 2015-04-13 15:26:51: Part of integration candidate 2015-03-10, |
Trac comment by glimes on 2016-02-16 13:16:45: Susie confirmed these tickets have been approved for CFE 6.5 |
Trac comment by jhageman on 2019-03-05 14:57:55: Milestone renamed |
All CFE apps that write a file should prefix that file with a header object defined in FS. Currently they do so on-the-fly by simply memset()'ing the structure to zero and setting a key field.
This should be cleaned up and moved to an InitHeader() call in CFE FS such that if fields need to be added to the header in the future this can be done without having to touch many different places where the header is initialized/written.
The text was updated successfully, but these errors were encountered: