Page MenuHomeFreeBSD

fsck_msdosfs: Use le32enc/le16enc macros to simplify
AbandonedPublic

Authored by cem on Jun 4 2019, 4:52 PM.
Tags
None
Referenced Files
F131360861: D20517.id58235.diff
Tue, Oct 7, 6:12 AM
Unknown Object (File)
Sat, Sep 20, 6:58 PM
Unknown Object (File)
Sat, Sep 20, 3:49 PM
Unknown Object (File)
Sat, Sep 20, 3:15 PM
Unknown Object (File)
Sat, Sep 20, 3:10 PM
Unknown Object (File)
Sat, Sep 20, 3:10 PM
Unknown Object (File)
Sat, Sep 20, 2:40 PM
Unknown Object (File)
Mon, Sep 8, 1:30 PM
Subscribers
None

Details

Reviewers
delphij

Diff Detail

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

Event Timeline

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