Skip to content
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

Obsolete logic in CFE_ES_QueryAllCmd file handling (related to OpenCreate) #1362

Closed
skliper opened this issue Apr 14, 2021 · 0 comments · Fixed by #1582 or #1584
Closed

Obsolete logic in CFE_ES_QueryAllCmd file handling (related to OpenCreate) #1362

skliper opened this issue Apr 14, 2021 · 0 comments · Fixed by #1582 or #1584

Comments

@skliper
Copy link
Contributor

skliper commented Apr 14, 2021

Is your feature request related to a problem? Please describe.
Obsolete logic, second OS_OpenCreate will truncate anyways:

Result = OS_OpenCreate(&FileDescriptor, QueryAllFilename, OS_FILE_FLAG_NONE, OS_READ_ONLY);
if (Result >= 0)
{
OS_close(FileDescriptor);
OS_remove(QueryAllFilename);
}
/*
** Create ES task log data file
*/
Result = OS_OpenCreate(&FileDescriptor, QueryAllFilename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE,
OS_WRITE_ONLY);

Describe the solution you'd like
Simplify

Describe alternatives you've considered
None

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the 7.0.0 milestone Apr 14, 2021
@skliper skliper self-assigned this May 26, 2021
skliper added a commit to skliper/cFE that referenced this issue May 26, 2021
skliper added a commit to skliper/cFE that referenced this issue May 26, 2021
skliper added a commit to skliper/cFE that referenced this issue May 26, 2021
- Updated CFE_ES_QueryAllCmd handler
- Updated CFE_ES_QueryAllTasksCmd handler
astrogeco added a commit that referenced this issue May 27, 2021
Fix #1362, Simplify CFE_ES_QueryAllCmd file open logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants