Fix nasa#484, will check the lseek() return value in linux_sysmon_upd…#485
Merged
Merged
Conversation
jphickey
requested changes
May 22, 2026
jphickey
left a comment
Contributor
There was a problem hiding this comment.
This doesn't seem to add value. If the lseek failed for whatever reason, the later read will fail, and this will end up following the error paths from there.
While I agree that the error checking here could be better, I'm not sure this improves it. As this is linux-specific code, we should at least capture errno and print the message.
Also - as a side note - 0 is the only valid output from this call because it is SEEK_SET. Any nonzero value means it did not seek correctly.
Contributor
Author
|
Need to include the ERRNO value to the OS_printf() output. |
f3721bf to
f1997e5
Compare
jphickey
previously approved these changes
Jun 2, 2026
We really should include the errno message here
Contributor
Author
|
@jphickey - If |
f1997e5 to
b7e7932
Compare
jphickey
previously approved these changes
Jun 2, 2026
…update_schedstat() in fsw/modules/linux_sysmon/linux_sysmon.c
b7e7932 to
7bc0f39
Compare
jphickey
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist (Please check before submitting)
Describe the contribution
Fixes #484, will suppress ignored return value warning by casting lseek() as
(void)Testing performed
Expected behavior changes
System(s) tested on
Additional context
Add any other context about the contribution here.
Third party code
If included, identify any third party code and provide text file of license
Contributor Info - All information REQUIRED for consideration of pull request
Michael Yang NASA/GSFC