Page MenuHomeFreeBSD

fsck_msdosfs: Use le32enc/le16enc macros to simplify
Needs RevisionPublic

Authored by cem on Jun 4 2019, 4:52 PM.

Details

Reviewers
delphij

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 24682
Build 23450: arc lint + arc unit

Event Timeline

cem created this revision.Jun 4 2019, 4:52 PM
delphij requested changes to this revision.Jun 4 2019, 8:28 PM
delphij added inline comments.
sbin/fsck_msdosfs/fat.c
628

I don't think the new code is equivalent... You probably meant to & CLUST32_MASK instead of | ~CLUST32_MASK here.

Line 629 in old code doesn't make much sense to me because *p should be 0 and it's a no-op, and it is fine to just drop it in the proposed change.

638

Not related to your change, but I think we should probably assert that cl always even (cl & 1 == 0) here.

640

Please use CLUST12_MASK instead of 0xfff.

648

Please rebase with latest svn revision.

666

I think it should be ((*p & 0xf0) << 8) | (fat[cl].next & CLUST12_MASK) here (end result: the 4 LSBs of *p become the MSBs of the new 16-bit word at p)?

This revision now requires changes to proceed.Jun 4 2019, 8:28 PM