Page MenuHomeFreeBSD

Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809
ClosedPublic

Authored by arichardson on Sun, Feb 21, 12:55 PM.

Details

Summary

The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses
struct buf from <sys/buf.h> rather than the makefs struct m_buf.
To work around this problem provide a local denode.h that includes
ffs/buf.h and defines buf as an alias for m_buf.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Could you please explain suggested modification to the msdosfs headers?

I am fine with the workaround from this review, but I highly dislike direct abuse of kernel headers done in makefs(8). I did buildworld on HEAD, and run kyua test in usr.sbin/makefs. I have no idea how to detect more breakage.

BTW, I run tinderbox and make buildworld on stable/12, and it succeeded.

This revision is now accepted and ready to land.Sun, Feb 21, 2:51 PM

The breakage only occurs if you build makefs as part of the bootstrap tools. I.e. you'll need LOCAL_XTOOL_DIRS="lib/libnetbsd usr.sbin/makefs" -DBOOTSTRAP_ALL_TOOLS and/or D27619 to reproduce the build failure (happening for me on 12.2).

I'll look into the changes to the msdosfs headers tomorrow to see if that's less ugly.

Possibly slightly less ugly version

This revision now requires review to proceed.Mon, Feb 22, 11:01 AM
sys/fs/msdosfs/denode.h
54

May be, instead of _KERNEL check, add #include <sys/buf.h> to consumers in sys/fs/msdosfs that lack it? Then remove this include at all.

sys/fs/msdosfs/denode.h
54

Sounds good, let me try that.

Seems to build just fine without the sys/buf.h include

arichardson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mon, Feb 22, 5:41 PM