summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
committerphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
commit2a5a36a02853b65f9dcdd33ca804b7b132403350 (patch)
tree0abc9dfd2498cac032fdc78b264f4351548fce5a /sys/ufs/ffs
parentbaca7dc09c90e600a6551ac34435856837a2a2fd (diff)
downloadFreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.zip
FreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.tar.gz
Staticize.
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c20
-rw-r--r--sys/ufs/ffs/ffs_extern.h8
-rw-r--r--sys/ufs/ffs/ffs_subr.c4
-rw-r--r--sys/ufs/ffs/ffs_tables.c6
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c20
-rw-r--r--sys/ufs/ffs/ffs_vnops.c21
6 files changed, 41 insertions, 38 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 33653d5..b000d56 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94
- * $Id: ffs_alloc.c,v 1.20 1995/12/03 11:16:21 bde Exp $
+ * $Id: ffs_alloc.c,v 1.21 1995/12/15 03:36:25 peter Exp $
*/
#include <sys/param.h>
@@ -41,6 +41,7 @@
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <vm/vm.h>
@@ -59,7 +60,9 @@ typedef long allocfcn_t __P((struct inode *ip, int cg, daddr_t bpref,
static daddr_t ffs_alloccg __P((struct inode *, int, daddr_t, int));
static daddr_t ffs_alloccgblk __P((struct fs *, struct cg *, daddr_t));
+#ifdef notyet
static daddr_t ffs_clusteralloc __P((struct inode *, int, daddr_t, int));
+#endif
static ino_t ffs_dirpref __P((struct fs *));
static daddr_t ffs_fragextend __P((struct inode *, int, long, int, int));
static void ffs_fserr __P((struct fs *, u_int, char *));
@@ -68,7 +71,7 @@ static u_long ffs_hashalloc
static ino_t ffs_nodealloccg __P((struct inode *, int, daddr_t, int));
static daddr_t ffs_mapsearch __P((struct fs *, struct cg *, daddr_t, int));
-void ffs_clusteracct __P((struct fs *, struct cg *, daddr_t, int));
+static void ffs_clusteracct __P((struct fs *, struct cg *, daddr_t, int));
/*
* Allocate a block in the file system.
@@ -325,11 +328,8 @@ nospace:
* Note that the error return is not reflected back to the user. Rather
* the previous block allocation will be used.
*/
-#include <sys/sysctl.h>
-int doasyncfree = 1;
-#ifdef DEBUG
-SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
-#endif
+static int doasyncfree = 1;
+SYSCTL_INT(_debug, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
int
ffs_reallocblks(ap)
struct vop_reallocblks_args /* {
@@ -337,7 +337,7 @@ ffs_reallocblks(ap)
struct cluster_save *a_buflist;
} */ *ap;
{
-#if 1
+#if !defined (not_yes)
return (ENOSPC);
#else
struct fs *fs;
@@ -1006,6 +1006,7 @@ gotit:
return (cgp->cg_cgx * fs->fs_fpg + bno);
}
+#ifdef notyet
/*
* Determine whether a cluster can be allocated.
*
@@ -1094,6 +1095,7 @@ fail:
brelse(bp);
return (0);
}
+#endif
/*
* Determine whether an inode can be allocated.
@@ -1415,7 +1417,7 @@ ffs_mapsearch(fs, cgp, bpref, allocsiz)
*
* Cnt == 1 means free; cnt == -1 means allocating.
*/
-void
+static void
ffs_clusteracct(fs, cgp, blkno, cnt)
struct fs *fs;
struct cg *cgp;
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index 9a4bbfd..efcf06e 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
- * $Id: ffs_extern.h,v 1.7 1995/09/06 05:41:16 dyson Exp $
+ * $Id: ffs_extern.h,v 1.8 1995/11/09 08:14:04 bde Exp $
*/
struct buf;
@@ -62,14 +62,10 @@ int ffs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
struct vnode **, int *, struct ucred **));
int ffs_flushfiles __P((struct mount *, int, struct proc *));
void ffs_fragacct __P((struct fs *, int, long [], int));
-int ffs_fsync __P((struct vop_fsync_args *));
int ffs_init __P((void));
int ffs_isblock __P((struct fs *, u_char *, daddr_t));
-int ffs_mount __P((struct mount *,
- char *, caddr_t, struct nameidata *, struct proc *));
int ffs_mountfs __P((struct vnode *, struct mount *, struct proc *));
int ffs_mountroot __P((void));
-int ffs_read __P((struct vop_read_args *));
int ffs_reallocblks __P((struct vop_reallocblks_args *));
int ffs_realloccg __P((struct inode *,
daddr_t, daddr_t, int, int, struct ucred *, struct buf **));
@@ -84,8 +80,6 @@ int ffs_valloc __P((struct vop_valloc_args *));
int ffs_vfree __P((struct vop_vfree_args *));
int ffs_vget __P((struct mount *, ino_t, struct vnode **));
int ffs_vptofh __P((struct vnode *, struct fid *));
-int ffs_write __P((struct vop_write_args *));
-int ffs_getpages __P((struct vop_getpages_args *));
#ifdef DIAGNOSTIC
void ffs_checkoverlap __P((struct buf *, struct inode *));
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c
index e6aa986..0ad07cd 100644
--- a/sys/ufs/ffs/ffs_subr.c
+++ b/sys/ufs/ffs/ffs_subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_subr.c 8.2 (Berkeley) 9/21/93
- * $Id: ffs_subr.c,v 1.4 1995/05/30 08:15:00 rgrimes Exp $
+ * $Id: ffs_subr.c,v 1.5 1995/09/04 00:20:55 dyson Exp $
*/
#include <sys/param.h>
@@ -118,7 +118,7 @@ ffs_fragacct(fs, fragmap, fraglist, cnt)
}
}
-#if defined(KERNEL) && defined(DIAGNOSTIC)
+#if defined(KERNEL) && defined(DIAGNOSTIC) && defined(DDB)
void
ffs_checkoverlap(bp, ip)
struct buf *bp;
diff --git a/sys/ufs/ffs/ffs_tables.c b/sys/ufs/ffs/ffs_tables.c
index 089334f..9fe3424 100644
--- a/sys/ufs/ffs/ffs_tables.c
+++ b/sys/ufs/ffs/ffs_tables.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_tables.c 8.1 (Berkeley) 6/11/93
- * $Id: ffs_tables.c,v 1.2 1994/08/02 07:54:22 davidg Exp $
+ * $Id: ffs_tables.c,v 1.3 1995/05/30 08:15:02 rgrimes Exp $
*/
#include <sys/param.h>
@@ -59,7 +59,7 @@ int inside[9] = {
* These tables are used by the scanc instruction on the VAX to
* quickly find an appropriate fragment.
*/
-u_char fragtbl124[256] = {
+static u_char fragtbl124[256] = {
0x00, 0x16, 0x16, 0x2a, 0x16, 0x16, 0x26, 0x4e,
0x16, 0x16, 0x16, 0x3e, 0x2a, 0x3e, 0x4e, 0x8a,
0x16, 0x16, 0x16, 0x3e, 0x16, 0x16, 0x36, 0x5e,
@@ -94,7 +94,7 @@ u_char fragtbl124[256] = {
0x9e, 0x9e, 0x9e, 0xbe, 0xaa, 0xbe, 0xce, 0x8a,
};
-u_char fragtbl8[256] = {
+static u_char fragtbl8[256] = {
0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04,
0x01, 0x01, 0x01, 0x03, 0x02, 0x03, 0x04, 0x08,
0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x03, 0x05,
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 3c9774a..288e69c 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
- * $Id: ffs_vfsops.c,v 1.30 1995/12/07 12:47:51 davidg Exp $
+ * $Id: ffs_vfsops.c,v 1.31 1995/12/11 04:57:39 dyson Exp $
*/
#include <sys/param.h>
@@ -66,9 +66,11 @@
#include <vm/vm_page.h>
#include <vm/vm_object.h>
-int ffs_sbupdate __P((struct ufsmount *, int));
-int ffs_reload __P((struct mount *,struct ucred *,struct proc *));
-int ffs_oldfscompat __P((struct fs *));
+static int ffs_sbupdate __P((struct ufsmount *, int));
+static int ffs_reload __P((struct mount *,struct ucred *,struct proc *));
+static int ffs_oldfscompat __P((struct fs *));
+static int ffs_mount __P((struct mount *,
+ char *, caddr_t, struct nameidata *, struct proc *));
struct vfsops ufs_vfsops = {
ffs_mount,
@@ -126,7 +128,7 @@ extern u_long nextgennumber;
* system call will fail with EFAULT in copyinstr in
* namei() if it is a genuine NULL from the user.
*/
-int
+static int
ffs_mount( mp, path, data, ndp, p)
register struct mount *mp; /* mount struct pointer*/
char *path; /* path to mount point*/
@@ -350,7 +352,7 @@ success:
* 5) invalidate all cached file data.
* 6) re-read inode data for all active vnodes.
*/
-int
+static int
ffs_reload(mp, cred, p)
register struct mount *mp;
struct ucred *cred;
@@ -598,7 +600,7 @@ out:
*
* XXX - goes away some day.
*/
-int
+static int
ffs_oldfscompat(fs)
struct fs *fs;
{
@@ -823,7 +825,7 @@ loop:
* return the inode locked. Detection and handling of mount points must be
* done by the calling routine.
*/
-int ffs_inode_hash_lock;
+static int ffs_inode_hash_lock;
int
ffs_vget(mp, ino, vpp)
@@ -1005,7 +1007,7 @@ ffs_vptofh(vp, fhp)
/*
* Write a superblock and associated information back to disk.
*/
-int
+static int
ffs_sbupdate(mp, waitfor)
struct ufsmount *mp;
int waitfor;
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 9df1715..f768986 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vnops.c 8.7 (Berkeley) 2/3/94
- * $Id: ffs_vnops.c,v 1.18 1995/11/14 09:40:06 phk Exp $
+ * $Id: ffs_vnops.c,v 1.19 1995/12/07 12:47:52 davidg Exp $
*/
#include <sys/param.h>
@@ -67,9 +67,14 @@
#include <ufs/ffs/fs.h>
#include <ufs/ffs/ffs_extern.h>
+static int ffs_fsync __P((struct vop_fsync_args *));
+static int ffs_getpages __P((struct vop_getpages_args *));
+static int ffs_read __P((struct vop_read_args *));
+static int ffs_write __P((struct vop_write_args *));
+
/* Global vfs data structures for ufs. */
vop_t **ffs_vnodeop_p;
-struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)ufs_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)ufs_create }, /* create */
@@ -115,11 +120,11 @@ struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)vn_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc ffs_vnodeop_opv_desc =
+static struct vnodeopv_desc ffs_vnodeop_opv_desc =
{ &ffs_vnodeop_p, ffs_vnodeop_entries };
vop_t **ffs_specop_p;
-struct vnodeopv_entry_desc ffs_specop_entries[] = {
+static struct vnodeopv_entry_desc ffs_specop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)spec_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)spec_create }, /* create */
@@ -165,11 +170,11 @@ struct vnodeopv_entry_desc ffs_specop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)vn_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc ffs_specop_opv_desc =
+static struct vnodeopv_desc ffs_specop_opv_desc =
{ &ffs_specop_p, ffs_specop_entries };
vop_t **ffs_fifoop_p;
-struct vnodeopv_entry_desc ffs_fifoop_entries[] = {
+static struct vnodeopv_entry_desc ffs_fifoop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)fifo_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)fifo_create }, /* create */
@@ -214,7 +219,7 @@ struct vnodeopv_entry_desc ffs_fifoop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)vn_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc ffs_fifoop_opv_desc =
+static struct vnodeopv_desc ffs_fifoop_opv_desc =
{ &ffs_fifoop_p, ffs_fifoop_entries };
VNODEOP_SET(ffs_vnodeop_opv_desc);
@@ -242,7 +247,7 @@ SYSCTL_INT(_debug, 12, doclusterwrite, CTLFLAG_RW, &doclusterwrite, 0, "");
* Synch an open file.
*/
/* ARGSUSED */
-int
+static int
ffs_fsync(ap)
struct vop_fsync_args /* {
struct vnode *a_vp;
OpenPOWER on IntegriCloud