With some file system the ls is unable to display file types.
Details
Details
- Reviewers
allanjude imp - Commits
- rS316112: loader: ls command should display file types properly
verified zfs, ufs, nfs, dosfs
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 8166 Build 8388: arc lint + arc unit
Event Timeline
sys/boot/common/ls.c | ||
---|---|---|
120 | sb is not used after this, until it is overwritten by the call to stat(). |
Comment Actions
malloc can fail: so the stat size and mode should be zeroed before.
stat can fail: set mode = 0
and free does not need the check, but the comment is helpful.
sys/boot/common/ls.c | ||
---|---|---|
120 | something got missing in between... the size and mode need to be zeroed for case we do not get into the stat. |
Comment Actions
missed one more malloc check, and small cstyle fix - missing space after
return keyword.