From nobody Tue Apr 22 21:51:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zhwth608Jz5tFYd; Tue, 22 Apr 2025 21:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zhwth0T4fz3gMw; Tue, 22 Apr 2025 21:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745358716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+UqFZhMb/5FfpdYnlrfxIxwjW0nJmC2Yezklrr7wc0=; b=R8v0+oZ6Mh0BaAUamnGinirw4WwU52R28I7kbjoDwuAZ75AtiRglmuyHJklBE0oRBejLTN Mm1mPwDKfuDYxEc40kJj26sr8vEII3YzOBi7qvGkubWWRb8gOlw3R0dhifqChuHvjDaoiq n/xIVro9hzbiag61qNugnBJNU1pqcfsa18kK0f8Tml6ljPD7HAwW6AqH/uQf0wr8RdsZLs 3bAIjna+bcaCKuL3850W3QAMkkRjt5i/MpL/qF7zdUfHX2q62Fg3uc7vCT08LSkarSMz0x G443fnf10qx8NqAYXoPqd9+3kCsiUU7hTipye3mlbqW7m0txNEDCUTAe4dVs3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745358716; a=rsa-sha256; cv=none; b=R0YwcGpuywlwBnxJTFILP+Il9OLI1QQ2iPAr8O6NvHItS89TgV4lVaMqK+dIsBAT3CWohe 5H3PBmDOfnZxdxAEusp8FqugkCVN2RuA475xKRupsZsJXCUq1ym/85qImw9Ph9Wk+UAdXR +5p1xmdHOP9IoYFD1u6vOJeGzraRYGyWxqmGZhlEwxn7G6HiiC+wAqH7cHu7W6r4CHyUVK XJGTyMGN9WiZQvOXYBfHhiUTwSETOO8f0PgVLSMhBPVaqDOvHgMU1BcGe6VDF624Vol2QC iDfY4Dp1VATSY8o996PLCeXx+OrxALYJORXLOLigMWYUTMNB0iI9nF1EoDp4tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745358716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+UqFZhMb/5FfpdYnlrfxIxwjW0nJmC2Yezklrr7wc0=; b=lL0IDLSLkOeI5zdqkpwIFs4ePsSupvz7j9TWWjZpGrIb8tHLEbYBdFQREQ9nTQY0mS+wQo pyd8pfGSq2f91IBRN7NIKcMs199TJ4gBiHofwiUEJvoEkdzGKuLgryezdaFqg64/Zhhk1/ BaBJUXm0sfGBNaAhu9M9m60ZJDwsxSS3G8mVARhdVFtpkc9KaadXQCI6wVHJIA/lDba/LG cSTO48j8VTZTigKgIwpmTSaG/A9Ud/JsVVsHhzKdjuwMiMBVAB8Cnk3GwzCfk+ded9N7hU vnbkwl2F7kXAtQN4LzepOhyaNZQXiDPlLDejH4A8lNjvlgz1/J/FiBYwnMU8rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zhwth03v0zcsQ; Tue, 22 Apr 2025 21:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53MLptoQ098051; Tue, 22 Apr 2025 21:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53MLptNP098048; Tue, 22 Apr 2025 21:51:55 GMT (envelope-from git) Date: Tue, 22 Apr 2025 21:51:55 GMT Message-Id: <202504222151.53MLptNP098048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: cda23fc36d22 - main - Move mntopts(3) suppport into libutil List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cda23fc36d22bfa9d57d1a57c0daaeeb86bac94f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cda23fc36d22bfa9d57d1a57c0daaeeb86bac94f commit cda23fc36d22bfa9d57d1a57c0daaeeb86bac94f Author: Brooks Davis AuthorDate: 2025-04-22 21:50:19 +0000 Commit: Brooks Davis CommitDate: 2025-04-22 21:51:42 +0000 Move mntopts(3) suppport into libutil Many programs use this functionality so it should be available centrally rather than compiled into each program independently. This has the modest downside of adding libutil dependencies to some mount_ programs, but many (plus mount(8)) already have those depndencies so this shouldn't be a major imposition. In commit 906c312bbf74, Kirk said this could be done once the change was merged to FreeBSD 13. That happened in commit 668dfa016698 in 2023. While here perform related tidying including removing SRCS where the only entry is ${PROG}.c rendering it unnecessary. Reviewed by: olce, dim, emaste Differential Revision: https://reviews.freebsd.org/D49951 --- lib/libutil/Makefile | 14 +++++++++++-- {sbin/mount => lib/libutil}/mntopts.3 | 26 +++++++++++------------- sbin/mount/getmntopts.c => lib/libutil/mntopts.c | 0 {sbin/mount => lib/libutil}/mntopts.h | 5 +++++ sbin/fsck/Makefile | 5 +---- sbin/fsck_ffs/Makefile | 8 ++++---- sbin/growfs/Makefile | 5 +---- sbin/init/Makefile | 6 ------ sbin/mksnap_ffs/Makefile | 3 +-- sbin/mount/Makefile | 12 ++--------- sbin/mount_cd9660/Makefile | 8 +------- sbin/mount_fusefs/Makefile | 7 +------ sbin/mount_msdosfs/Makefile | 11 +--------- sbin/mount_nfs/Makefile | 8 ++++---- sbin/mount_nullfs/Makefile | 7 +------ sbin/mount_udf/Makefile | 7 +------ sbin/mount_unionfs/Makefile | 7 +------ sbin/tunefs/Makefile | 7 +------ tests/sys/fs/fusefs/Makefile | 4 ---- usr.sbin/autofs/Makefile | 7 ------- usr.sbin/mount_smbfs/Makefile | 7 ++----- usr.sbin/mountd/Makefile | 5 ----- 22 files changed, 51 insertions(+), 118 deletions(-) diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 8178d33b7ba8..0639745d08fc 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -16,9 +16,10 @@ SRCS= _secure_path.c auth.c cpuset.c expand_number.c flopen.c fparseln.c \ kinfo_getvmobject.c kld.c \ login_auth.c login_cap.c \ login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \ + mntopts.c \ pidfile.c property.c pty.c pw_scan.c pw_util.c quotafile.c \ realhostname.c stub.c trimdomain.c uucplock.c -INCS= libutil.h login_cap.h +INCS= libutil.h login_cap.h mntopts.h CFLAGS+= -DNO__SCCSID @@ -32,7 +33,8 @@ MAN+= cpuset.3 expand_number.3 flopen.3 fparseln.3 ftime.3 getlocalbase.3 \ hexdump.3 humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ kinfo_getproc.3 kinfo_getvmmap.3 kinfo_getvmobject.3 kld.3 \ login_auth.3 login_cap.3 \ - login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \ + login_class.3 login_ok.3 login_times.3 login_tty.3 mntopts.3 \ + pidfile.3 \ property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 @@ -54,6 +56,14 @@ MLINKS+=login_times.3 in_lt.3 login_times.3 in_ltm.3 \ login_times.3 in_ltms.3 \ login_times.3 in_lts.3 \ login_times.3 parse_lt.3 +MLINKS+=mntopts.3 getmntopts.3 \ + mntopts.3 getmntpoint.3 \ + mntopts.3 chkdoreload.3 \ + mntopts.3 build_iovec.3 \ + mntopts.3 build_iovec_argf.3 \ + mntopts.3 free_iovec.3 \ + mntopts.3 checkpath.3 \ + mntopts.3 rmslashes.3 MLINKS+=pidfile.3 pidfile_close.3 \ pidfile.3 pidfile_fileno.3 \ pidfile.3 pidfile_open.3 \ diff --git a/sbin/mount/mntopts.3 b/lib/libutil/mntopts.3 similarity index 96% rename from sbin/mount/mntopts.3 rename to lib/libutil/mntopts.3 index 74fca612479f..35f6d476fcec 100644 --- a/sbin/mount/mntopts.3 +++ b/lib/libutil/mntopts.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2023 +.Dd April 21, 2025 .Dt MNTOPTS 3 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm checkpath , .Nm rmslashes .Nd "mount point operations" +.Sh LIBRARY +.Lb libutil .Sh SYNOPSIS .In mntopts.h .Ft void @@ -69,18 +71,6 @@ The .Nm mntopts functions support operations associated with a mount point. -For historic reasons are in a file in the sources for the -.Xr mount 8 -program. -Thus, to access them the following lines need to be added to the -.Nm Makefile -of the program wanting to use them: -.Bd -literal -SRCS+= getmntopts.c -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+= -I${MOUNT} -\&.PATH: ${MOUNT} -.Ed .Pp The .Fn getmntopts @@ -326,7 +316,7 @@ flag, would also have an entry. This can be declared and used as follows: .Bd -literal -#include "mntopts.h" +#include struct mntopt mopts[] = { MOPT_STDOPTS, @@ -377,3 +367,11 @@ and .Fn chkdoreload functions were added in .Fx 13.2 . +.Pp +Historically, these functions were found in getmntopts.c in the sources for the +.Xr mount 8 +program. +As of +.Fx 15.0 +they are part of +.Nm libutil . diff --git a/sbin/mount/getmntopts.c b/lib/libutil/mntopts.c similarity index 100% rename from sbin/mount/getmntopts.c rename to lib/libutil/mntopts.c diff --git a/sbin/mount/mntopts.h b/lib/libutil/mntopts.h similarity index 98% rename from sbin/mount/mntopts.h rename to lib/libutil/mntopts.h index dc1452097ed8..0027b8ca7155 100644 --- a/sbin/mount/mntopts.h +++ b/lib/libutil/mntopts.h @@ -29,6 +29,9 @@ * SUCH DAMAGE. */ +#ifndef _MNTOPTS_H_ +#define _MNTOPTS_H_ + struct mntopt { const char *m_option; /* option name */ int m_inverse; /* if a negative option, e.g. "atime" */ @@ -107,3 +110,5 @@ extern int getmnt_silent; void build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, size_t len); void build_iovec_argf(struct iovec **iov, int *iovlen, const char *name, const char *fmt, ...); void free_iovec(struct iovec **iovec, int *iovlen); + +#endif /* !_MNTOPTS_H_ */ diff --git a/sbin/fsck/Makefile b/sbin/fsck/Makefile index 3273ea730dc8..33ff4784a92b 100644 --- a/sbin/fsck/Makefile +++ b/sbin/fsck/Makefile @@ -3,10 +3,7 @@ PACKAGE=runtime PROG= fsck SRCS= fsck.c fsutil.c preen.c -SRCS+= getmntopts.c MAN= fsck.8 -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} +LIBADD= util .include diff --git a/sbin/fsck_ffs/Makefile b/sbin/fsck_ffs/Makefile index 7b0f0ed822bf..c6676007db2a 100644 --- a/sbin/fsck_ffs/Makefile +++ b/sbin/fsck_ffs/Makefile @@ -5,12 +5,12 @@ LINKS+= ${BINDIR}/fsck_ffs ${BINDIR}/fsck_4.2bsd MAN= fsck_ffs.8 MLINKS= fsck_ffs.8 fsck_ufs.8 fsck_ffs.8 fsck_4.2bsd.8 SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \ - pass4.c pass5.c setup.c suj.c utilities.c gjournal.c getmntopts.c \ + pass4.c pass5.c setup.c suj.c utilities.c gjournal.c \ globs.c -LIBADD= ufs +LIBADD= ufs util WARNS?= 2 -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/mount +CFLAGS+= -I${.CURDIR} -.PATH: ${SRCTOP}/sys/ufs/ffs ${.CURDIR:H}/mount +.PATH: ${SRCTOP}/sys/ufs/ffs .include diff --git a/sbin/growfs/Makefile b/sbin/growfs/Makefile index 6fb1ba51db00..b5b3d99f287d 100644 --- a/sbin/growfs/Makefile +++ b/sbin/growfs/Makefile @@ -3,13 +3,10 @@ .include -.PATH: ${.CURDIR:H}/mount - PACKAGE=ufs PROG= growfs -SRCS= growfs.c getmntopts.c +SRCS= growfs.c MAN= growfs.8 -CFLAGS+=-I${.CURDIR:H}/mount .if defined(GFSDBG) SRCS+= debug.c diff --git a/sbin/init/Makefile b/sbin/init/Makefile index 124a9f77dede..1fc9b633f664 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -1,7 +1,6 @@ CONFGROUPS= CONFTTYS PACKAGE=runtime PROG= init -SRCS= init.c getmntopts.c MAN= init.8 PRECIOUSPROG= INSTALLFLAGS=-b -B.bak @@ -11,11 +10,6 @@ LIBADD= util crypt CONFTTYSNAME= ttys CONFTTYS+= ttys -# Needed for getmntopts.c -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+=-I${MOUNT} -.PATH: ${MOUNT} - NO_SHARED?= YES .include diff --git a/sbin/mksnap_ffs/Makefile b/sbin/mksnap_ffs/Makefile index 591fd6adcc22..cf5079fdfa8e 100644 --- a/sbin/mksnap_ffs/Makefile +++ b/sbin/mksnap_ffs/Makefile @@ -2,11 +2,10 @@ PACKAGE=ufs PROG= mksnap_ffs -SRCS= mksnap_ffs.c getmntopts.c +LIBADD= util MAN= mksnap_ffs.8 WARNS?= 2 -CFLAGS+=-I${.CURDIR:H}/mount .if defined(NOSUID) BINMODE=554 diff --git a/sbin/mount/Makefile b/sbin/mount/Makefile index 9b5c9b9e593d..e2a3098813c4 100644 --- a/sbin/mount/Makefile +++ b/sbin/mount/Makefile @@ -1,15 +1,7 @@ PACKAGE=runtime PROG= mount -SRCS= mount.c mount_fs.c getmntopts.c vfslist.c -MAN= mntopts.3 mount.8 -MLINKS+= mntopts.3 getmntopts.3 -MLINKS+= mntopts.3 getmntpoint.3 -MLINKS+= mntopts.3 chkdoreload.3 -MLINKS+= mntopts.3 build_iovec.3 -MLINKS+= mntopts.3 build_iovec_argf.3 -MLINKS+= mntopts.3 free_iovec.3 -MLINKS+= mntopts.3 checkpath.3 -MLINKS+= mntopts.3 rmslashes.3 +SRCS= mount.c mount_fs.c vfslist.c +MAN= mount.8 LIBADD= util xo diff --git a/sbin/mount_cd9660/Makefile b/sbin/mount_cd9660/Makefile index 3a8f9cd45cb4..9fa8e7436169 100644 --- a/sbin/mount_cd9660/Makefile +++ b/sbin/mount_cd9660/Makefile @@ -1,16 +1,10 @@ PACKAGE=runtime PROG= mount_cd9660 -SRCS= mount_cd9660.c getmntopts.c MAN= mount_cd9660.8 -LIBADD= kiconv - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+= -I${MOUNT} +LIBADD= kiconv util # Needs to be dynamically linked for optional dlopen() access to # userland libiconv NO_SHARED?= NO -.PATH: ${MOUNT} - .include diff --git a/sbin/mount_fusefs/Makefile b/sbin/mount_fusefs/Makefile index 0c173bf1b687..e683b35f0c8a 100644 --- a/sbin/mount_fusefs/Makefile +++ b/sbin/mount_fusefs/Makefile @@ -20,12 +20,7 @@ DEBUG_FLAGS+= -DFUSE4BSD_VERSION="\"${F4BVERS}\"" PACKAGE=runtime PROG= mount_fusefs -SRCS= mount_fusefs.c getmntopts.c MAN8= mount_fusefs.8 - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+= -I${MOUNT} - -.PATH: ${MOUNT} +LIBADD= util .include diff --git a/sbin/mount_msdosfs/Makefile b/sbin/mount_msdosfs/Makefile index e01755b2fce2..50f07f175001 100644 --- a/sbin/mount_msdosfs/Makefile +++ b/sbin/mount_msdosfs/Makefile @@ -1,19 +1,10 @@ -# -# - PACKAGE=runtime PROG= mount_msdosfs -SRCS= mount_msdosfs.c getmntopts.c MAN= mount_msdosfs.8 -LIBADD= kiconv - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+= -I${MOUNT} +LIBADD= kiconv util # Needs to be dynamically linked for optional dlopen() access to # userland libiconv NO_SHARED?= NO -.PATH: ${MOUNT} - .include diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile index 3e61a9f680e0..fb425106dd81 100644 --- a/sbin/mount_nfs/Makefile +++ b/sbin/mount_nfs/Makefile @@ -1,12 +1,12 @@ PACKAGE=nfs PROG= mount_nfs -SRCS= mount_nfs.c getmntopts.c mounttab.c +SRCS= mount_nfs.c mounttab.c MAN= mount_nfs.8 +LIBADD= util -MOUNT= ${.CURDIR:H}/mount UMNTALL= ${SRCTOP}/usr.sbin/rpc.umntall -CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL} +CFLAGS+= -DNFS -I${UMNTALL} -.PATH: ${MOUNT} ${UMNTALL} +.PATH: ${UMNTALL} .include diff --git a/sbin/mount_nullfs/Makefile b/sbin/mount_nullfs/Makefile index 12e87308ed13..1844aa14b24f 100644 --- a/sbin/mount_nullfs/Makefile +++ b/sbin/mount_nullfs/Makefile @@ -1,11 +1,6 @@ PACKAGE=runtime PROG= mount_nullfs -SRCS= mount_nullfs.c getmntopts.c MAN= mount_nullfs.8 - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+=-I${MOUNT} - -.PATH: ${MOUNT} +LIBADD= util .include diff --git a/sbin/mount_udf/Makefile b/sbin/mount_udf/Makefile index c41c051fc315..6506f6ba3985 100644 --- a/sbin/mount_udf/Makefile +++ b/sbin/mount_udf/Makefile @@ -1,12 +1,7 @@ PACKAGE=runtime PROG= mount_udf -SRCS= mount_udf.c getmntopts.c MAN= mount_udf.8 -LIBADD= kiconv - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+= -I${MOUNT} -I${SRCTOP}/sys -.PATH: ${MOUNT} +LIBADD= kiconv util # Needs to be dynamically linked for optional dlopen() access to # userland libiconv diff --git a/sbin/mount_unionfs/Makefile b/sbin/mount_unionfs/Makefile index 2096386a3784..35e7e8fa75b7 100644 --- a/sbin/mount_unionfs/Makefile +++ b/sbin/mount_unionfs/Makefile @@ -1,11 +1,6 @@ PACKAGE=runtime PROG= mount_unionfs -SRCS= mount_unionfs.c getmntopts.c MAN= mount_unionfs.8 - -MOUNT= ${.CURDIR:H}/mount -CFLAGS+=-I${MOUNT} - -.PATH: ${MOUNT} +LIBADD= util .include diff --git a/sbin/tunefs/Makefile b/sbin/tunefs/Makefile index e236525557e1..4ea2219c8e03 100644 --- a/sbin/tunefs/Makefile +++ b/sbin/tunefs/Makefile @@ -1,13 +1,8 @@ PACKAGE=ufs PROG= tunefs -SRCS= tunefs.c getmntopts.c -LIBADD= ufs +LIBADD= ufs util MAN= tunefs.8 -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} - WARNS?= 3 .include diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 06b82071fe31..4265f5b71dfa 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -55,7 +55,6 @@ GTESTS+= xattr .for p in ${GTESTS} SRCS.$p+= ${p}.cc -SRCS.$p+= getmntopts.c SRCS.$p+= mockfs.cc SRCS.$p+= utils.cc .endfor @@ -68,7 +67,6 @@ TEST_METADATA.nfs+= required_user="root" TEST_METADATA+= timeout=10 FUSEFS= ${SRCTOP}/sys/fs/fuse -MOUNT= ${SRCTOP}/sbin/mount # Suppress warnings that GCC generates for the libc++ and gtest headers. CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes # Suppress Wcast-align for readdir.cc, because it is unavoidable when using @@ -87,8 +85,6 @@ CXXWARNFLAGS+= -Wno-vla-cxx-extension .endif CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} -CXXFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} LIBADD+= pthread LIBADD+= gmock gtest diff --git a/usr.sbin/autofs/Makefile b/usr.sbin/autofs/Makefile index 2d0c1bcb8806..b32c617cfd56 100644 --- a/usr.sbin/autofs/Makefile +++ b/usr.sbin/autofs/Makefile @@ -6,7 +6,6 @@ SRCS+= automountd.c SRCS+= autounmountd.c SRCS+= common.c SRCS+= defined.c -SRCS+= getmntopts.c SRCS+= log.c SRCS+= popen.c SRCS+= token.l @@ -18,15 +17,9 @@ MAN= automount.8 automountd.8 autounmountd.8 auto_master.5 LIBADD= util -# Needed for getmntopts.c -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+=-I${MOUNT} - LINKS= ${BINDIR}/automountd ${BINDIR}/automount LINKS+= ${BINDIR}/automountd ${BINDIR}/autounmountd -.PATH: ${MOUNT} - SUBDIR= autofs .include diff --git a/usr.sbin/mount_smbfs/Makefile b/usr.sbin/mount_smbfs/Makefile index 8bd1b0f34d99..857d475103d0 100644 --- a/usr.sbin/mount_smbfs/Makefile +++ b/usr.sbin/mount_smbfs/Makefile @@ -1,15 +1,12 @@ PROG= mount_smbfs PACKAGE= smbutils -SRCS= mount_smbfs.c getmntopts.c MAN= mount_smbfs.8 -MOUNTDIR= ${SRCTOP}/sbin/mount CONTRIBDIR= ${SRCTOP}/contrib/smbfs -CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTRIBDIR}/include +CFLAGS+= -DSMBFS -I${CONTRIBDIR}/include -LIBADD= smb +LIBADD= smb util .PATH: ${CONTRIBDIR}/mount_smbfs -.PATH: ${MOUNTDIR} .include diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile index e63b03bbfe45..ebc4d3438cc1 100644 --- a/usr.sbin/mountd/Makefile +++ b/usr.sbin/mountd/Makefile @@ -1,13 +1,8 @@ PROG= mountd -SRCS= mountd.c getmntopts.c MAN= exports.5 netgroup.5 mountd.8 -MOUNT= ${SRCTOP}/sbin/mount -CFLAGS+= -I${MOUNT} WARNS?= 2 -.PATH: ${MOUNT} - LIBADD= util .include