The mntopts(3) functions support operations associated with a mount point. The main purpose of this commit is to document the mntopts(3) functions that now appear in 18 utilities in the base system. See mntopt.3 below for the documentation details.
The getmntopts() function appeared in 4.4BSD. The build_iovec(), build_iovec_argf(), free_iovec(), checkpath(), and rmslashes() functions were added with nmount(8) in FreeBSD 5.0. The getmntpoint() and chkdoreload() functions are being added in this commit for FreeBSD 14.0. Only the getmntopts() function was documented and its manual page was never installed.
These functions should be in a library but for historic reasons are in a file in the sources for the mount(8) program. Thus, to access them the following lines need to be added to the Makefile of the program wanting to use them:
Once these changes have been MFC'ed to 13 they may be made into a library, -lmntops. Please comment on whether you think mntopts(3) should be made into a library.