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
Unknown Object (File)
Feb 5 2024, 8:48 PM
Unknown Object (File)
Feb 5 2024, 8:30 PM
Unknown Object (File)
Jan 17 2024, 12:11 AM
Unknown Object (File)
Dec 20 2023, 12:49 AM
Unknown Object (File)
Oct 31 2023, 6:54 PM
Unknown Object (File)
Oct 28 2023, 6:57 AM
Unknown Object (File)
Oct 12 2023, 12:51 AM
Unknown Object (File)
Sep 30 2023, 1:45 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