Page MenuHomeFreeBSD

makefs: Support st_flags even on Linux
ClosedPublic

Authored by jrtc27 on Tue, Apr 29, 7:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 14, 6:59 AM
Unknown Object (File)
Sat, May 10, 6:12 PM
Unknown Object (File)
Sat, May 10, 7:57 AM
Unknown Object (File)
Fri, May 9, 2:26 PM
Unknown Object (File)
Fri, May 9, 12:33 PM
Unknown Object (File)
Fri, May 9, 10:56 AM
Unknown Object (File)
Tue, May 6, 7:35 PM
Unknown Object (File)
Mon, May 5, 11:42 AM

Details

Summary

Linux's struct stat does not have an st_flags member, but we still want
to be able to create FreeBSD disk images with non-zero st_flags. Add a
replacement member to struct fsinode to store it on Linux.

Note that we add a fallback definition of HAVE_STRUCT_STAT_ST_FLAGS for
makefs.h since etdump reaches into makefs and won't have it defined in
its CFLAGS like makefs itself does, and on FreeBSD we don't provide an
nbtool_config.h.

Note also that strtofflags is currently a stub on Linux so this doesn't
yet properly mirror the mtree, but that will change in a future commit.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added a subscriber: christos_netbsd.org.

This is fine with me. I'll cc @christos_netbsd.org in case NetBSD would like to make an equivalent change (or maybe they already have one?)

This revision is now accepted and ready to land.Tue, Apr 29, 8:28 PM

This is fine with me. I'll cc @christos_netbsd.org in case NetBSD would like to make an equivalent change (or maybe they already have one?)

I glanced at the NetBSD source and they still do the same as the old code here. Similarly they conflate host and target flags and have stub implementations.

This revision was automatically updated to reflect the committed changes.
OSZAR »