From nobody Mon Jun 16 21:37:25 2025 X-Original-To: dev-commits-src-main@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 4bLjyY55xrz5yS09; Mon, 16 Jun 2025 21:37:25 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bLjyY2PLPz3JVm; Mon, 16 Jun 2025 21:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750109845; 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=3TyxlkemaYdow0sGc/6OGtEWm90To38rzrMZsZf+rRU=; b=fdBCoqZRT7kYvPyqod92Av4pRQiv70qsI31ZapAW7THuKEs4gM9Cc5+twhOmC3GnzJy2kJ P1lDQ1dxi802ogwAAK1SJMhxqRaHGzf69yU4uW8Ji+AXIePFt9neP83UKx+tljN7DswApq etZ5PzK9ZuXlKXx64tQWOpxY+vPfspgVZLNQeNUvCLJeOIhnu5Oyzdm5wXl+jZhoLSSBU7 bYbBNqE+XtpKMfWCicnaFD/BnjvKnPyW+S+7Vv4TIxYraALpNgWbKyAS0pEmXofmdb6t9u 06Er8pSNhQ3zdDughyjLNR9fymLl1EKsD5a6S3qbJEGd/uNB0nhxZSwgRm5ASA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750109845; 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=3TyxlkemaYdow0sGc/6OGtEWm90To38rzrMZsZf+rRU=; b=ZK+RgDTOg6+2EjSo7NsD4PXghJxHOZsPkpDQx3g+GQo6QhIMKY1ODMw4x/f+YMcF/xS+jX c/mGNqSLu4M8DtXxl7p1m9rLs8B5V5pttTZGLIiHZuQY5JYw/97CmI1eYXdgKoViu6jdMK m1ePbRIseob+7Kr+9D80jugUBrZLhtFcBbbivM5xZnobHn49Az1IpvTD1O1XlKfE0HvJlg qaYNPMYnXRsuSs7WC9SPiLMdzuU/f7gpGQf95t12py3GheIQ9AwOic+sYTe3zt6R/UdS6g 9ufAG6nbORWWuUY8HbwoA19slvnc+ePDfXJWTjgj7xsCDYxDPuJbH/LVq7pPUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750109845; a=rsa-sha256; cv=none; b=dSZRBl4Iqrbz++AZDsohdyeoMTWtcTl4+jcPsB0JXtuXO3IToEF+ii09bszluthBW58Lz4 soAVnKynmnroNiV1TgmJt+DvxBxdMKdkF6l0q1vbQfCCkeTNhvH63kTTfZZKdJUcVmi4W0 +smeCC/q6zB4F/7uOtVR+Aedapxh+PqBpfof88/dd8LQtGqFWqE1LDDE5PTmWcOBVQLfRn ykjYg3ZbmP69oltYX4FxRueIhYLFAL3pJTyUUJ7acfmM6w2aL7lQjtE7ALh0UmN9jk0Fm6 NcU9Ui3znDCcVam19O2ivr74FZcuoV3bw+YVwMx36x2TvmR0SUpgX4K2mfe2Tw== 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 4bLjyY1lj9zbR; Mon, 16 Jun 2025 21:37:25 +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 55GLbPvr073058; Mon, 16 Jun 2025 21:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55GLbPR5073055; Mon, 16 Jun 2025 21:37:25 GMT (envelope-from git) Date: Mon, 16 Jun 2025 21:37:25 GMT Message-Id: <202506162137.55GLbPR5073055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b61239ef83d6 - main - msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b61239ef83d671f04c3f9d3ace96cb07e0c9e6df Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b61239ef83d671f04c3f9d3ace96cb07e0c9e6df commit b61239ef83d671f04c3f9d3ace96cb07e0c9e6df Author: Jessica Clarke AuthorDate: 2025-06-16 21:33:18 +0000 Commit: Jessica Clarke CommitDate: 2025-06-16 21:33:18 +0000 msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers This lets other bits of userspace expose these various definitions too. In particular, this will be used by libprocstat so it can stop defining _KERNEL. The function prototypes surely won't be useful in other contexts, but the various types are, and it's not worth hiding the prototypes unless they end up causing issues, but so long as they aren't called they shouldn't be a problem. Note the MAKEFS define continues to exist, but only for use in newfs_msdos, as those sources are reused by makefs with some changed behaviour. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D50718 --- sys/fs/msdosfs/denode.h | 4 ++-- sys/fs/msdosfs/fat.h | 4 ++-- sys/fs/msdosfs/msdosfsmount.h | 10 +++++----- usr.sbin/makefs/msdos/Makefile.inc | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index 0d31b0583fa6..e6928fb46052 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -212,7 +212,7 @@ struct denode { ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#if defined(_KERNEL) || defined(MAKEFS) +#if defined(_KERNEL) || defined(_WANT_MSDOSFS_INTERNALS) #define VTODE(vp) ((struct denode *)(vp)->v_data) #define DETOV(de) ((de)->de_vnode) @@ -294,5 +294,5 @@ int removede(struct denode *pdep, struct denode *dep); int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred); int doscheckpath( struct denode *source, struct denode *target, daddr_t *wait_scn); -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL || _WANT_MSDOSFS_INTERNALS */ #endif /* !_FS_MSDOSFS_DENODE_H_ */ diff --git a/sys/fs/msdosfs/fat.h b/sys/fs/msdosfs/fat.h index a88bfb94e91d..344cd5a9416d 100644 --- a/sys/fs/msdosfs/fat.h +++ b/sys/fs/msdosfs/fat.h @@ -81,7 +81,7 @@ #define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) -#if defined (_KERNEL) || defined(MAKEFS) +#if defined (_KERNEL) || defined(_WANT_MSDOSFS_INTERNALS) /* * These are the values for the function argument to the function * fatentry(). @@ -110,5 +110,5 @@ markvoldirty(struct msdosfsmount *pmp, bool dirty) return (markvoldirty_upgrade(pmp, dirty, false)); } -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL || _WANT_MSDOSFS_INTERNALS */ #endif /* !_FS_MSDOSFS_FAT_H_ */ diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index adfc7e4d0e88..fcaac544a74d 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -52,10 +52,10 @@ #ifndef _MSDOSFS_MSDOSFSMOUNT_H_ #define _MSDOSFS_MSDOSFSMOUNT_H_ -#if defined (_KERNEL) || defined(MAKEFS) +#if defined(_KERNEL) || defined(_WANT_MSDOSFS_INTERNALS) #include -#ifndef MAKEFS +#ifdef _KERNEL #include #include #else @@ -246,9 +246,9 @@ struct msdosfs_fileno { #define MSDOSFS_ASSERT_MP_LOCKED(pmp) \ lockmgr_assert(&(pmp)->pm_fatlock, KA_XLOCKED) -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL || _WANT_MSDOSFS_INTERNALS */ -#ifndef MAKEFS +#ifdef _KERNEL /* * Arguments to mount MSDOS filesystems. */ @@ -266,7 +266,7 @@ struct msdosfs_args { char *cs_local; /* Local Charset */ mode_t dirmask; /* dir mask to be applied for msdosfs perms */ }; -#endif /* MAKEFS */ +#endif /* _KERNEL */ /* * Msdosfs mount options: diff --git a/usr.sbin/makefs/msdos/Makefile.inc b/usr.sbin/makefs/msdos/Makefile.inc index 78ddc7804b31..cfa9e0e114c2 100644 --- a/usr.sbin/makefs/msdos/Makefile.inc +++ b/usr.sbin/makefs/msdos/Makefile.inc @@ -3,7 +3,7 @@ MSDOS_NEWFS= ${SRCTOP}/sbin/newfs_msdos .PATH: ${SRCDIR}/msdos ${MSDOS} ${MSDOS_NEWFS} -CFLAGS+= -DMAKEFS -I${MSDOS} -I${MSDOS_NEWFS} +CFLAGS+= -DMAKEFS -D_WANT_MSDOSFS_INTERNALS -I${MSDOS} -I${MSDOS_NEWFS} SRCS+= mkfs_msdos.c SRCS+= msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c