Misleading command code comment in `FM_ChildFileInfoCmd
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- c
- Domain
- documentation
Research direction
Open fsw/src/fm_child.c around line 789 and inspect the FM_ChildFileInfoCmd comment alongside the command handler. Change the documented command code to FM_GET_FILE_INFO_CC, then review the surrounding comment to confirm it describes Get File Info without changing runtime code.
Written by the indexing model from the issue text.
Description
Description
In the function FM_ChildFileInfoCmd, the comment describing the command arguments contains an incorrect command code reference:
https://github.com/nasa/FM/blob/558a7763027dd6d495a603624e7dd6b35f9952ac/fsw/src/fm_child.c#L789
/*
** Command argument usage for this command:
**
** CmdArgs->CommandCode = FM_GET_DIR_LIST_FILE_CC
** CmdArgs->Source1 = name of directory or file
** CmdArgs->FileInfoState = state of directory or file
** CmdArgs->FileInfoSize = file size, else zero
** CmdArgs->FileInfoTime = last modify time
*/
However, this function handles the Get File Info command, and the correct command code should be:
FM_GET_FILE_INFO_CC
Issue
The current comment is misleading because:
FM_GET_DIR_LIST_FILE_CCrefers to a different command (directory listing context)- This can confuse developers trying to understand or maintain the code
- It may lead to incorrect assumptions when tracing command handling
Suggested Fix
Update the comment to:
CmdArgs->CommandCode = FM_GET_FILE_INFO_CC
Impact
This is a documentation/comment issue only and does not affect runtime behavior.
- Dominant language
- C
- Stars
- 45
- Forks
- 39
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nasa/FM
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
docs
-
docs Equuleus-rc2 requirements
-
enhancement Equuleus-rc2
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·