From owner-svn-src-all@FreeBSD.ORG Thu Jun 16 23:40:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 538931065673; Thu, 16 Jun 2011 23:40:11 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2970B8FC15; Thu, 16 Jun 2011 23:40:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5GNeB6q050630; Thu, 16 Jun 2011 23:40:11 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5GNeBIY050626; Thu, 16 Jun 2011 23:40:11 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201106162340.p5GNeBIY050626@svn.freebsd.org> From: Kirk McKusick Date: Thu, 16 Jun 2011 23:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223169 - in head: sys/ufs/ffs usr.sbin/makefs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2011 23:40:11 -0000 Author: mckusick Date: Thu Jun 16 23:40:10 2011 New Revision: 223169 URL: http://svn.freebsd.org/changeset/base/223169 Log: Drop the include of from usr.sbin/makefs/ffs/ffs_bswap.c and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that file. No other programs or libraries include (nor should they as it is totally in-kernel interfaces). For added protection I enclosed the entire contents of in ifdef _KERNEL. Feedback from: Bruce Evans and Tai-hwa Liang Modified: head/sys/ufs/ffs/ffs_extern.h head/usr.sbin/makefs/ffs/ffs_bswap.c head/usr.sbin/makefs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Thu Jun 16 23:36:01 2011 (r223168) +++ head/sys/ufs/ffs/ffs_extern.h Thu Jun 16 23:40:10 2011 (r223169) @@ -33,7 +33,10 @@ #ifndef _UFS_FFS_EXTERN_H #define _UFS_FFS_EXTERN_H -enum vtype; +#ifndef _KERNEL +#error "No user-serving parts inside" +#else + struct buf; struct cg; struct fid; @@ -168,7 +171,6 @@ void softdep_freework(struct workhead *) int ffs_rdonly(struct inode *); -#ifdef _KERNEL TAILQ_HEAD(snaphead, inode); struct snapdata { @@ -178,6 +180,7 @@ struct snapdata { daddr_t *sn_blklist; struct lock sn_lock; }; + #endif /* _KERNEL */ #endif /* !_UFS_FFS_EXTERN_H */ Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_bswap.c Thu Jun 16 23:36:01 2011 (r223168) +++ head/usr.sbin/makefs/ffs/ffs_bswap.c Thu Jun 16 23:40:10 2011 (r223169) @@ -41,14 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include "ffs/ufs_bswap.h" #include -/* XXX temporary */ -struct ufsmount; -struct bufobj; -struct mount; -struct vnode; -typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, - struct vnode **vpp); -#include #if !defined(_KERNEL) #include Modified: head/usr.sbin/makefs/ffs/ffs_subr.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_subr.c Thu Jun 16 23:36:01 2011 (r223168) +++ head/usr.sbin/makefs/ffs/ffs_subr.c Thu Jun 16 23:40:10 2011 (r223169) @@ -38,15 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include -/* XXX temporary */ -struct ufsmount; -struct bufobj; -struct mount; -struct vnode; -typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, - struct vnode **vpp); -#include #include "ffs/ufs_bswap.h" + void panic __P((const char *, ...)) __attribute__((__noreturn__,__format__(__printf__,1,2)));