Page MenuHomeFreeBSD

msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers
ClosedPublic

Authored by jrtc27 on Fri, Jun 6, 2:14 PM.
Tags
None
Referenced Files
F121912198: D50718.id.diff
Mon, Jun 30, 2:22 PM
F121905820: D50718.diff
Mon, Jun 30, 12:55 PM
Unknown Object (File)
Mon, Jun 30, 3:56 AM
Unknown Object (File)
Mon, Jun 30, 2:23 AM
Unknown Object (File)
Sun, Jun 29, 4:06 PM
Unknown Object (File)
Wed, Jun 25, 6:51 PM
Unknown Object (File)
Mon, Jun 23, 5:42 PM
Unknown Object (File)
Mon, Jun 23, 10:59 AM
Subscribers

Details

Summary

This lets other bits of userspace expose these various definitions too.
The function prototypes surely won't be useful in other contexts, but
the various types are, and it's not worth hiding the prototypes unless
they end up causing issues, but so long as they aren't called they
shouldn't be a problem.

Note the MAKEFS define continues to exist, but only for use in
newfs_msdos, as those sources are reused by makefs with some changed
behaviour.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 64918
Build 61801: arc lint + arc unit

Event Timeline

jrtc27 requested review of this revision.Fri, Jun 6, 2:14 PM
This revision is now accepted and ready to land.Fri, Jun 6, 2:48 PM
markj added a subscriber: markj.
markj added inline comments.
sys/fs/msdosfs/msdosfsmount.h
119–120

Or just include _lockmgr.h and _lock.h like you did in D50716? I'm not a big fan of conditionally compiled struct members.

sys/fs/msdosfs/msdosfsmount.h
119–120

Perhaps this one really should be #ifndef MAKEFS... in the libkvm-related cases you probably do want the actual kernel layout, but for makefs it isn't using these. I guess you could still define them for makefs, but it could get confusing to have locks that are documented as being for something yet not used for that in makefs. Not sure what's best really.

sys/fs/msdosfs/msdosfsmount.h
119–120

IMO it's not that great a sin to leave unused lock fields in the structure even though they're unused by makefs. There are other fields here which are certainly not used by makefs, e.g., pm_mountp, pm_cp, pm_bo, and the pervasive use of kernel structures and code in makefs already makes things confusing in my experience.

I'd probably just get rid of the ifdef and make the header self-contained, but it's up to you.

This revision now requires review to proceed.Mon, Jun 16, 7:52 PM
This revision is now accepted and ready to land.Mon, Jun 16, 9:08 PM