From owner-svn-src-head@freebsd.org Wed Aug 21 02:21:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53F45E712A; Wed, 21 Aug 2019 02:21:42 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46CryG1c0bz4MH0; Wed, 21 Aug 2019 02:21:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19ED4CBAC; Wed, 21 Aug 2019 02:21:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7L2LfnP095731; Wed, 21 Aug 2019 02:21:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7L2LeQH095708; Wed, 21 Aug 2019 02:21:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908210221.x7L2LeQH095708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Aug 2019 02:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351321 - in head: sys/fs/msdosfs usr.sbin/makefs/msdos X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: sys/fs/msdosfs usr.sbin/makefs/msdos X-SVN-Commit-Revision: 351321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2019 02:21:42 -0000 Author: emaste Date: Wed Aug 21 02:21:40 2019 New Revision: 351321 URL: https://svnweb.freebsd.org/changeset/base/351321 Log: makefs: share fat.h between kernel msdosfs and makefs There is no reason to duplicate this file when it can be trivially shared (just exposing one section previously under #ifdef _KERNEL). Reviewed by: imp, cem MFC with: r351273 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21346 Deleted: head/usr.sbin/makefs/msdos/fat.h Modified: head/sys/fs/msdosfs/fat.h head/usr.sbin/makefs/msdos/Makefile.inc head/usr.sbin/makefs/msdos/msdosfs_conv.c head/usr.sbin/makefs/msdos/msdosfs_denode.c head/usr.sbin/makefs/msdos/msdosfs_fat.c head/usr.sbin/makefs/msdos/msdosfs_lookup.c head/usr.sbin/makefs/msdos/msdosfs_vfsops.c head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/fat.h ============================================================================== --- head/sys/fs/msdosfs/fat.h Wed Aug 21 02:17:39 2019 (r351320) +++ head/sys/fs/msdosfs/fat.h Wed Aug 21 02:21:40 2019 (r351321) @@ -82,7 +82,7 @@ #define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) -#ifdef _KERNEL +#if defined (_KERNEL) || defined(MAKEFS) /* * These are the values for the function argument to the function * fatentry(). @@ -105,5 +105,5 @@ int extendfile(struct denode *dep, u_long count, struc void fc_purge(struct denode *dep, u_int frcn); int markvoldirty(struct msdosfsmount *pmp, int dirty); -#endif /* _KERNEL */ +#endif /* _KERNEL || MAKEFS */ #endif /* !_FS_MSDOSFS_FAT_H_ */ Modified: head/usr.sbin/makefs/msdos/Makefile.inc ============================================================================== --- head/usr.sbin/makefs/msdos/Makefile.inc Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/Makefile.inc Wed Aug 21 02:21:40 2019 (r351321) @@ -6,7 +6,7 @@ MSDOS_NEWFS= ${SRCTOP}/sbin/newfs_msdos .PATH: ${SRCDIR}/msdos ${MSDOS} ${MSDOS_NEWFS} -CFLAGS+= -I${MSDOS} -I${MSDOS_NEWFS} +CFLAGS+= -DMAKEFS -I${MSDOS} -I${MSDOS_NEWFS} SRCS+= mkfs_msdos.c SRCS+= msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c Modified: head/usr.sbin/makefs/msdos/msdosfs_conv.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_conv.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_conv.c Wed Aug 21 02:21:40 2019 (r351321) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" #include "msdos/msdosfsmount.h" static int char8ucs2str(const uint8_t *in, int n, uint16_t *out, int m); Modified: head/usr.sbin/makefs/msdos/msdosfs_denode.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_denode.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_denode.c Wed Aug 21 02:21:40 2019 (r351321) @@ -60,16 +60,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include "msdos/denode.h" +#include "msdos/msdosfsmount.h" +#include #include "makefs.h" #include "msdos.h" #include "ffs/buf.h" -#include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" -#include "msdos/msdosfsmount.h" /* * If deget() succeeds it returns with the gotten denode locked(). Modified: head/usr.sbin/makefs/msdos/msdosfs_fat.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_fat.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_fat.c Wed Aug 21 02:21:40 2019 (r351321) @@ -59,13 +59,13 @@ #include #include +#include "msdos/denode.h" +#include "msdos/msdosfsmount.h" +#include #include "ffs/buf.h" -#include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" -#include "msdos/msdosfsmount.h" #include "makefs.h" #include "msdos.h" Modified: head/usr.sbin/makefs/msdos/msdosfs_lookup.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_lookup.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_lookup.c Wed Aug 21 02:21:40 2019 (r351321) @@ -57,13 +57,13 @@ #include #include +#include "msdos/denode.h" +#include "msdos/msdosfsmount.h" +#include #include "ffs/buf.h" -#include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" -#include "msdos/msdosfsmount.h" #include "makefs.h" #include "msdos.h" Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Aug 21 02:21:40 2019 (r351321) @@ -60,6 +60,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include "msdos/denode.h" +#include "msdos/msdosfsmount.h" +#include #include @@ -68,10 +71,7 @@ __FBSDID("$FreeBSD$"); #include "ffs/buf.h" -#include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" -#include "msdos/msdosfsmount.h" struct msdosfsmount * msdosfs_mount(struct vnode *devvp) Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Aug 21 02:17:39 2019 (r351320) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Aug 21 02:21:40 2019 (r351321) @@ -63,16 +63,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include "msdos/denode.h" +#include "msdos/msdosfsmount.h" +#include #include "makefs.h" #include "msdos.h" #include "ffs/buf.h" -#include "msdos/denode.h" #include "msdos/direntry.h" -#include "msdos/fat.h" -#include "msdos/msdosfsmount.h" /* * Some general notes: