Page MenuHomeFreeBSD

Move mount related functions into libmount
AbandonedPublic

Authored by dim on Apr 22 2025, 10:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 1:54 AM
Unknown Object (File)
Sep 2 2025, 5:39 PM
Unknown Object (File)
Aug 20 2025, 8:07 AM
Unknown Object (File)
Aug 11 2025, 9:37 AM
Unknown Object (File)
Jul 19 2025, 12:34 AM
Unknown Object (File)
Jul 13 2025, 4:03 PM
Unknown Object (File)
Jul 10 2025, 7:15 PM
Unknown Object (File)
Jun 19 2025, 3:57 AM

Details

Summary

This avoids several programs using .PATH to reach over into the
sbin/mount subdirectory to recompile getmntopts.c, mounttab.c or
vfslist.c, namely:

  • sbin/fsck
  • sbin/fsck_ffs
  • sbin/growfs
  • sbin/init
  • sbin/mksnap_ffs
  • sbin/mount_cd9660
  • sbin/mount_fusefs
  • sbin/mount_msdosfs
  • sbin/mount_nfs
  • sbin/mount_nullfs
  • sbin/mount_udf
  • sbin/mount_unionfs
  • sbin/tunefs
  • sbin/umount
  • tests/sys/fs/fusefs
  • usr.sbin/autofs
  • usr.sbin/mount_smbfs
  • usr.sbin/mountd
  • usr.sbin/rpc.umntall

MFC after: 1 week

Diff Detail

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

Event Timeline

dim requested review of this revision.Apr 22 2025, 10:03 AM

Sorry, I should have added you to D49951 and D49952 which this duplicates. I don't think a new library is warranted and if it is, it should probably be libmntopts or the like not something as generic as libmount.

I've commented on one makefile with some complaints that apply to most of them.

usr.sbin/mountd/Makefile
2

This line is now is gratuitous (SRCS=${PROG}.c by default)

5

The installed copy should be used.

Sorry, I should have added you to D49951 and D49952 which this duplicates. I don't think a new library is warranted and if it is, it should probably be libmntopts or the like not something as generic as libmount.

My incentive was really to fix the issue for tests/sys/fs/fusefs/Makefile, since my bsd.progs.mk / .pieo patch depended on that. I started with just libmntopts and getmntopts.c, but I noticed that a similar .PATH construct is used also for mounttab.c and vfslist.c.

In any case, I don't care too much where these functions are stuffed, as long as the .PATH reaching-over thing is fixed. If libutil is more of a general grab-bag of functionality that doesn't fit anywhere else, I'm fine with that too.

I've commented on one makefile with some complaints that apply to most of them.

I'm probably going to abandon this for your D49951 and D49952. For me the test/sys/fs/fusefs fix the most important one.

Abandoning in favor of D49951 and D49952.