summaryrefslogtreecommitdiffstats
path: root/sys/ufs
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
parentbaca7dc09c90e600a6551ac34435856837a2a2fd (diff)
downloadFreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.zip
FreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.tar.gz
Staticize.
Diffstat (limited to 'sys/ufs')
-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
-rw-r--r--sys/ufs/lfs/lfs_bio.c8
-rw-r--r--sys/ufs/lfs/lfs_extern.h26
-rw-r--r--sys/ufs/lfs/lfs_segment.c66
-rw-r--r--sys/ufs/lfs/lfs_syscalls.c10
-rw-r--r--sys/ufs/lfs/lfs_vfsops.c29
-rw-r--r--sys/ufs/lfs/lfs_vnops.c176
-rw-r--r--sys/ufs/mfs/mfs_extern.h16
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c39
-rw-r--r--sys/ufs/mfs/mfs_vnops.c41
15 files changed, 173 insertions, 317 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;
diff --git a/sys/ufs/lfs/lfs_bio.c b/sys/ufs/lfs/lfs_bio.c
index 045e743..4816ab2 100644
--- a/sys/ufs/lfs/lfs_bio.c
+++ b/sys/ufs/lfs/lfs_bio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_bio.c 8.4 (Berkeley) 12/30/93
- * $Id: lfs_bio.c,v 1.6 1995/08/11 11:31:16 davidg Exp $
+ * $Id: lfs_bio.c,v 1.7 1995/12/03 11:16:35 bde Exp $
*/
#include <sys/param.h>
@@ -50,7 +50,7 @@
#include <ufs/lfs/lfs.h>
#include <ufs/lfs/lfs_extern.h>
-extern void lfs_flush __P((void));
+static void lfs_flush __P((void));
/*
* LFS block write function.
@@ -61,7 +61,7 @@ extern void lfs_flush __P((void));
*/
int lfs_allclean_wakeup; /* Cleaner wakeup address. */
int locked_queue_count; /* XXX Count of locked-down buffers. */
-int lfs_writing; /* Set if already kicked off a writer
+static int lfs_writing; /* Set if already kicked off a writer
because of buffer space */
/*
#define WRITE_THRESHHOLD ((nbuf >> 2) - 10)
@@ -133,7 +133,7 @@ lfs_bwrite(ap)
* buffers, so we can't have more than a single file system. To make this
* work for multiple file systems, put the count into the mount structure.
*/
-void
+static void
lfs_flush()
{
register struct mount *mp;
diff --git a/sys/ufs/lfs/lfs_extern.h b/sys/ufs/lfs/lfs_extern.h
index 4390bcb..64575dd 100644
--- a/sys/ufs/lfs/lfs_extern.h
+++ b/sys/ufs/lfs/lfs_extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_extern.h 8.2 (Berkeley) 4/16/94
- * $Id: lfs_extern.h,v 1.8 1995/11/09 08:14:13 bde Exp $
+ * $Id: lfs_extern.h,v 1.9 1995/12/06 19:46:37 bde Exp $
*/
#ifndef _UFS_LFS_LFS_EXTERN_H_
@@ -48,55 +48,33 @@ struct inode;
struct uio;
struct mbuf;
+
int lfs_balloc __P((struct vnode *, u_long, daddr_t, struct buf **));
int lfs_blkatoff __P((struct vop_blkatoff_args *));
int lfs_bwrite __P((struct vop_bwrite_args *));
int lfs_check __P((struct vnode *, daddr_t));
-int lfs_close __P((struct vop_close_args *));
-int lfs_create __P((struct vop_create_args *));
-int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
- struct vnode **, int *, struct ucred **));
void lfs_free_buffer __P((caddr_t, int));
-int lfs_fsync __P((struct vop_fsync_args *));
int lfs_gatherblock __P((struct segment *, struct buf *, int *));
-int lfs_getattr __P((struct vop_getattr_args *));
struct dinode *
lfs_ifind __P((struct lfs *, ino_t, struct dinode *));
-int lfs_inactive __P((struct vop_inactive_args *));
int lfs_init __P((void));
int lfs_initseg __P((struct lfs *));
-int lfs_link __P((struct vop_link_args *));
int lfs_makeinode __P((int, struct nameidata *, struct inode **));
-int lfs_mkdir __P((struct vop_mkdir_args *));
-int lfs_mknod __P((struct vop_mknod_args *));
-int lfs_mount __P((struct mount *,
- char *, caddr_t, struct nameidata *, struct proc *));
int lfs_mountroot __P((void));
struct buf *
lfs_newbuf __P((struct vnode *, daddr_t, size_t));
-int lfs_read __P((struct vop_read_args *));
-int lfs_remove __P((struct vop_remove_args *));
-int lfs_rmdir __P((struct vop_rmdir_args *));
-int lfs_rename __P((struct vop_rename_args *));
void lfs_seglock __P((struct lfs *, unsigned long flags));
void lfs_segunlock __P((struct lfs *));
int lfs_segwrite __P((struct mount *, int));
-int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
-int lfs_symlink __P((struct vop_symlink_args *));
-int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
int lfs_truncate __P((struct vop_truncate_args *));
-int lfs_unmount __P((struct mount *, int, struct proc *));
int lfs_update __P((struct vop_update_args *));
void lfs_updatemeta __P((struct segment *));
int lfs_valloc __P((struct vop_valloc_args *));
int lfs_vcreate __P((struct mount *, ino_t, struct vnode **));
int lfs_vfree __P((struct vop_vfree_args *));
int lfs_vflush __P((struct vnode *));
-int lfs_vget __P((struct mount *, ino_t, struct vnode **));
-int lfs_vptofh __P((struct vnode *, struct fid *));
int lfs_vref __P((struct vnode *));
void lfs_vunref __P((struct vnode *));
-int lfs_write __P((struct vop_write_args *));
int lfs_writeinode __P((struct lfs *, struct segment *, struct inode *));
int lfs_writeseg __P((struct lfs *, struct segment *));
void lfs_writesuper __P((struct lfs *));
diff --git a/sys/ufs/lfs/lfs_segment.c b/sys/ufs/lfs/lfs_segment.c
index 1fc1dec..e08e07d 100644
--- a/sys/ufs/lfs/lfs_segment.c
+++ b/sys/ufs/lfs/lfs_segment.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_segment.c 8.5 (Berkeley) 1/4/94
- * $Id: lfs_segment.c,v 1.14 1995/09/04 00:21:01 dyson Exp $
+ * $Id: lfs_segment.c,v 1.15 1995/12/03 11:16:46 bde Exp $
*/
#include <sys/param.h>
@@ -61,18 +61,18 @@
#include <ufs/lfs/lfs_extern.h>
extern int count_lock_queue __P((void));
-extern caddr_t lfs_alloc_buffer __P((int size));
-extern void lfs_reclaim_buffers __P((void));
+static caddr_t lfs_alloc_buffer __P((int size));
+static void lfs_reclaim_buffers __P((void));
#define MAX_ACTIVE 10
#define MAX_IO_BUFS 256
#define MAX_IO_SIZE (1024*512)
-int lfs_total_io_size;
-int lfs_total_io_count;
-volatile int lfs_total_free_count;
-int lfs_free_needed;
-int lfs_in_buffer_reclaim;
-struct lfs_freebuf {
+static int lfs_total_io_size;
+static int lfs_total_io_count;
+static volatile int lfs_total_free_count;
+static int lfs_free_needed;
+static int lfs_in_buffer_reclaim;
+static struct lfs_freebuf {
int size;
caddr_t address;
} lfs_freebufs[MAX_IO_BUFS];
@@ -88,7 +88,7 @@ lfs_free_buffer( caddr_t address, int size) {
}
}
-void
+static void
lfs_reclaim_buffers() {
int i,s;
int reclaimed = 0;
@@ -114,7 +114,7 @@ lfs_reclaim_buffers() {
}
}
-caddr_t
+static caddr_t
lfs_alloc_buffer(int size) {
int s;
caddr_t rtval;
@@ -145,19 +145,19 @@ lfs_alloc_buffer(int size) {
((fs)->lfs_dbpseg - ((fs)->lfs_offset - (fs)->lfs_curseg) > \
1 << (fs)->lfs_fsbtodb)
-void lfs_callback __P((struct buf *));
-void lfs_gather __P((struct lfs *, struct segment *,
+static void lfs_callback __P((struct buf *));
+static void lfs_gather __P((struct lfs *, struct segment *,
struct vnode *, int (*) __P((struct lfs *, struct buf *))));
void lfs_iset __P((struct inode *, daddr_t, time_t));
-int lfs_match_data __P((struct lfs *, struct buf *));
-int lfs_match_dindir __P((struct lfs *, struct buf *));
-int lfs_match_indir __P((struct lfs *, struct buf *));
-int lfs_match_tindir __P((struct lfs *, struct buf *));
-void lfs_newseg __P((struct lfs *));
-void lfs_shellsort __P((struct buf **, daddr_t *, register int));
-void lfs_supercallback __P((struct buf *));
-void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
-void lfs_writevnodes __P((struct lfs *fs, struct mount *mp,
+static int lfs_match_data __P((struct lfs *, struct buf *));
+static int lfs_match_dindir __P((struct lfs *, struct buf *));
+static int lfs_match_indir __P((struct lfs *, struct buf *));
+static int lfs_match_tindir __P((struct lfs *, struct buf *));
+static void lfs_newseg __P((struct lfs *));
+static void lfs_shellsort __P((struct buf **, daddr_t *, register int));
+static void lfs_supercallback __P((struct buf *));
+static void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
+static void lfs_writevnodes __P((struct lfs *fs, struct mount *mp,
struct segment *sp, int dirops));
/* Statistics Counters */
@@ -233,7 +233,7 @@ lfs_vflush(vp)
return (0);
}
-void
+static void
lfs_writevnodes(fs, mp, sp, op)
struct lfs *fs;
struct mount *mp;
@@ -402,7 +402,7 @@ redo:
/*
* Write the dirty blocks associated with a vnode.
*/
-void
+static void
lfs_writefile(fs, sp, vp)
struct lfs *fs;
struct segment *sp;
@@ -594,7 +594,7 @@ lfs_gatherblock(sp, bp, sptr)
return(0);
}
-void
+static void
lfs_gather(fs, sp, vp, match)
struct lfs *fs;
struct segment *sp;
@@ -784,7 +784,7 @@ lfs_initseg(fs)
/*
* Return the next segment to write.
*/
-void
+static void
lfs_newseg(fs)
struct lfs *fs;
{
@@ -1028,7 +1028,7 @@ lfs_writesuper(fs)
* Logical block number match routines used when traversing the dirty block
* chain.
*/
-int
+static int
lfs_match_data(fs, bp)
struct lfs *fs;
struct buf *bp;
@@ -1036,7 +1036,7 @@ lfs_match_data(fs, bp)
return (bp->b_lblkno >= 0);
}
-int
+static int
lfs_match_indir(fs, bp)
struct lfs *fs;
struct buf *bp;
@@ -1047,7 +1047,7 @@ lfs_match_indir(fs, bp)
return (lbn < 0 && (-lbn - NDADDR) % NINDIR(fs) == 0);
}
-int
+static int
lfs_match_dindir(fs, bp)
struct lfs *fs;
struct buf *bp;
@@ -1058,7 +1058,7 @@ lfs_match_dindir(fs, bp)
return (lbn < 0 && (-lbn - NDADDR) % NINDIR(fs) == 1);
}
-int
+static int
lfs_match_tindir(fs, bp)
struct lfs *fs;
struct buf *bp;
@@ -1096,7 +1096,7 @@ lfs_newbuf(vp, daddr, size)
return (bp);
}
-void
+static void
lfs_callback(bp)
struct buf *bp;
{
@@ -1115,7 +1115,7 @@ lfs_callback(bp)
}
-void
+static void
lfs_supercallback(bp)
struct buf *bp;
{
@@ -1137,7 +1137,7 @@ lfs_supercallback(bp)
* of logical block numbers to a unsigned in this routine so that the
* negative block numbers (meta data blocks) sort AFTER the data blocks.
*/
-void
+static void
lfs_shellsort(bp_array, lb_array, nmemb)
struct buf **bp_array;
daddr_t *lb_array;
diff --git a/sys/ufs/lfs/lfs_syscalls.c b/sys/ufs/lfs/lfs_syscalls.c
index b978cfb..09ec9bb 100644
--- a/sys/ufs/lfs/lfs_syscalls.c
+++ b/sys/ufs/lfs/lfs_syscalls.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_syscalls.c 8.5 (Berkeley) 4/20/94
- * $Id: lfs_syscalls.c,v 1.12 1995/09/04 00:21:02 dyson Exp $
+ * $Id: lfs_syscalls.c,v 1.13 1995/11/12 06:43:17 bde Exp $
*/
#include <sys/param.h>
@@ -65,8 +65,8 @@
if (sp->sum_bytes_left < (s)) { \
(void) lfs_writeseg(fs, sp); \
}
-struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
-int lfs_fastvget __P((struct mount *, ino_t, daddr_t, struct vnode **,
+static struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
+static int lfs_fastvget __P((struct mount *, ino_t, daddr_t, struct vnode **,
struct dinode *));
/*
@@ -448,7 +448,7 @@ lfs_segwait(p, uap, retval)
* processing IINFO structures, it may have the ondisk inode already, so
* don't go retrieving it again.
*/
-int
+static int
lfs_fastvget(mp, ino, daddr, vpp, dinp)
struct mount *mp;
ino_t ino;
@@ -557,7 +557,7 @@ lfs_fastvget(mp, ino, daddr, vpp, dinp)
*vpp = vp;
return (0);
}
-struct buf *
+static struct buf *
lfs_fakebuf(vp, lbn, size, uaddr)
struct vnode *vp;
int lbn;
diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c
index 80fb731..58de7b7 100644
--- a/sys/ufs/lfs/lfs_vfsops.c
+++ b/sys/ufs/lfs/lfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_vfsops.c 8.7 (Berkeley) 4/16/94
- * $Id: lfs_vfsops.c,v 1.11 1995/03/19 14:29:20 davidg Exp $
+ * $Id: lfs_vfsops.c,v 1.12 1995/08/28 09:19:12 julian Exp $
*/
#include <sys/param.h>
@@ -60,7 +60,16 @@
#include <ufs/lfs/lfs.h>
#include <ufs/lfs/lfs_extern.h>
-int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
+static int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
+ struct vnode **, int *, struct ucred **));
+static int lfs_mount __P((struct mount *, char *, caddr_t,
+ struct nameidata *, struct proc *));
+static int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
+static int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
+static int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
+static int lfs_unmount __P((struct mount *, int, struct proc *));
+static int lfs_vget __P((struct mount *, ino_t, struct vnode **));
+static int lfs_vptofh __P((struct vnode *, struct fid *));
struct vfsops lfs_vfsops = {
lfs_mount,
@@ -118,7 +127,7 @@ VFS_SET(lfs_vfsops, lfs, MOUNT_LFS, 0);
*
* Root mounts are not currently supported.
*/
-int
+static int
lfs_mount(mp, path, data, ndp, p)
register struct mount *mp;
char *path;
@@ -253,7 +262,7 @@ success:
* Common code for mount and mountroot
* LFS specific
*/
-int
+static int
lfs_mountfs(devvp, mp, p)
register struct vnode *devvp;
struct mount *mp;
@@ -380,7 +389,7 @@ out:
/*
* unmount system call
*/
-int
+static int
lfs_unmount(mp, mntflags, p)
struct mount *mp;
int mntflags;
@@ -439,7 +448,7 @@ lfs_unmount(mp, mntflags, p)
/*
* Get file system statistics.
*/
-int
+static int
lfs_statfs(mp, sbp, p)
struct mount *mp;
register struct statfs *sbp;
@@ -478,7 +487,7 @@ lfs_statfs(mp, sbp, p)
*
* Note: we are always called with the filesystem marked `MPBUSY'.
*/
-int
+static int
lfs_sync(mp, waitfor, cred, p)
struct mount *mp;
int waitfor;
@@ -500,7 +509,7 @@ lfs_sync(mp, waitfor, cred, p)
* in core, read it in from the specified device. Return the inode locked.
* Detection and handling of mount points must be done by the calling routine.
*/
-int
+static int
lfs_vget(mp, ino, vpp)
struct mount *mp;
ino_t ino;
@@ -606,7 +615,7 @@ lfs_vget(mp, ino, vpp)
* what is the relationship between my generational number and the NFS
* generational number.
*/
-int
+static int
lfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
register struct mount *mp;
struct fid *fhp;
@@ -627,7 +636,7 @@ lfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
* Vnode pointer to File handle
*/
/* ARGSUSED */
-int
+static int
lfs_vptofh(vp, fhp)
struct vnode *vp;
struct fid *fhp;
diff --git a/sys/ufs/lfs/lfs_vnops.c b/sys/ufs/lfs/lfs_vnops.c
index 948f011..49f6b1b 100644
--- a/sys/ufs/lfs/lfs_vnops.c
+++ b/sys/ufs/lfs/lfs_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_vnops.c 8.5 (Berkeley) 12/30/93
- * $Id: lfs_vnops.c,v 1.15 1995/11/09 08:14:15 bde Exp $
+ * $Id: lfs_vnops.c,v 1.16 1995/12/07 12:47:56 davidg Exp $
*/
#include <sys/param.h>
@@ -68,9 +68,17 @@
#include <ufs/lfs/lfs.h>
#include <ufs/lfs/lfs_extern.h>
+static int lfs_close __P((struct vop_close_args *));
+static int lfs_fsync __P((struct vop_fsync_args *));
+static int lfs_getattr __P((struct vop_getattr_args *));
+static int lfs_inactive __P((struct vop_inactive_args *));
+static int lfs_read __P((struct vop_read_args *));
+static int lfs_write __P((struct vop_write_args *));
+
+
/* Global vfs data structures for lfs. */
vop_t **lfs_vnodeop_p;
-struct vnodeopv_entry_desc lfs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc lfs_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 */
@@ -114,11 +122,11 @@ struct vnodeopv_entry_desc lfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)lfs_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc lfs_vnodeop_opv_desc =
+static struct vnodeopv_desc lfs_vnodeop_opv_desc =
{ &lfs_vnodeop_p, lfs_vnodeop_entries };
vop_t **lfs_specop_p;
-struct vnodeopv_entry_desc lfs_specop_entries[] = {
+static struct vnodeopv_entry_desc lfs_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 */
@@ -162,11 +170,11 @@ struct vnodeopv_entry_desc lfs_specop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)lfs_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc lfs_specop_opv_desc =
+static struct vnodeopv_desc lfs_specop_opv_desc =
{ &lfs_specop_p, lfs_specop_entries };
vop_t **lfs_fifoop_p;
-struct vnodeopv_entry_desc lfs_fifoop_entries[] = {
+static struct vnodeopv_entry_desc lfs_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 */
@@ -210,7 +218,7 @@ struct vnodeopv_entry_desc lfs_fifoop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)lfs_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc lfs_fifoop_opv_desc =
+static struct vnodeopv_desc lfs_fifoop_opv_desc =
{ &lfs_fifoop_p, lfs_fifoop_entries };
VNODEOP_SET(lfs_vnodeop_opv_desc);
@@ -225,7 +233,7 @@ VNODEOP_SET(lfs_fifoop_opv_desc);
* Synch an open file.
*/
/* ARGSUSED */
-int
+static int
lfs_fsync(ap)
struct vop_fsync_args /* {
struct vnode *a_vp;
@@ -265,155 +273,9 @@ lfs_fsync(ap)
#define MARK_VNODE(dvp) (dvp)->v_flag |= VDIROP
-int
-lfs_symlink(ap)
- struct vop_symlink_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- char *a_target;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- ret = ufs_symlink(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_mknod(ap)
- struct vop_mknod_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- ret = ufs_mknod(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_create(ap)
- struct vop_create_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- ret = ufs_create(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_mkdir(ap)
- struct vop_mkdir_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- int ret;
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- ret = ufs_mkdir(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_remove(ap)
- struct vop_remove_args /* {
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- MARK_VNODE(ap->a_vp);
- ret = ufs_remove(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_rmdir(ap)
- struct vop_rmdir_args /* {
- struct vnodeop_desc *a_desc;
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_dvp)->i_lfs);
- MARK_VNODE(ap->a_dvp);
- MARK_VNODE(ap->a_vp);
- ret = ufs_rmdir(ap);
- SET_ENDOP(VTOI(ap->a_dvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_link(ap)
- struct vop_link_args /* {
- struct vnode *a_tdvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_tdvp)->i_lfs);
- MARK_VNODE(ap->a_tdvp);
- ret = ufs_link(ap);
- SET_ENDOP(VTOI(ap->a_tdvp)->i_lfs);
- return (ret);
-}
-
-int
-lfs_rename(ap)
- struct vop_rename_args /* {
- struct vnode *a_fdvp;
- struct vnode *a_fvp;
- struct componentname *a_fcnp;
- struct vnode *a_tdvp;
- struct vnode *a_tvp;
- struct componentname *a_tcnp;
- } */ *ap;
-{
- int ret;
-
- SET_DIROP(VTOI(ap->a_fdvp)->i_lfs);
- MARK_VNODE(ap->a_fdvp);
- MARK_VNODE(ap->a_tdvp);
- ret = ufs_rename(ap);
- SET_ENDOP(VTOI(ap->a_fdvp)->i_lfs);
- return (ret);
-}
/* XXX hack to avoid calling ITIMES in getattr */
-int
+static int
lfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -461,7 +323,7 @@ lfs_getattr(ap)
* count.
*/
/* ARGSUSED */
-int
+static int
lfs_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -487,7 +349,7 @@ lfs_close(ap)
* Stub inactive routine that avoids calling ufs_inactive in some cases.
*/
-int
+static int
lfs_inactive(ap)
struct vop_inactive_args /* {
struct vnode *a_vp;
diff --git a/sys/ufs/mfs/mfs_extern.h b/sys/ufs/mfs/mfs_extern.h
index 887c3d7..2464659 100644
--- a/sys/ufs/mfs/mfs_extern.h
+++ b/sys/ufs/mfs/mfs_extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_extern.h 8.1 (Berkeley) 6/11/93
- * $Id: mfs_extern.h,v 1.3 1994/08/21 07:16:10 paul Exp $
+ * $Id: mfs_extern.h,v 1.4 1995/08/28 09:19:13 julian Exp $
*/
#ifndef _UFS_MFS_MFS_EXTERN_H_
@@ -46,23 +46,9 @@ struct ucred;
struct vnode;
__BEGIN_DECLS
-int mfs_badop __P((void));
-int mfs_bmap __P((struct vop_bmap_args *));
-int mfs_close __P((struct vop_close_args *));
void mfs_doio __P((struct buf *bp, caddr_t base));
-int mfs_inactive __P((struct vop_inactive_args *)); /* XXX */
-int mfs_reclaim __P((struct vop_reclaim_args *)); /* XXX */
-int mfs_init __P((void));
-int mfs_ioctl __P((struct vop_ioctl_args *));
-int mfs_mount __P((struct mount *mp,
- char *path, caddr_t data, struct nameidata *ndp, struct proc *p));
int mfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
int mfs_mountroot __P((void));
-int mfs_open __P((struct vop_open_args *));
-int mfs_print __P((struct vop_print_args *)); /* XXX */
-int mfs_start __P((struct mount *mp, int flags, struct proc *p));
-int mfs_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p));
-int mfs_strategy __P((struct vop_strategy_args *)); /* XXX */
__END_DECLS
#endif
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index af009e6..5a788f6 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vfsops.c 8.4 (Berkeley) 4/16/94
- * $Id: mfs_vfsops.c,v 1.18 1995/12/14 14:25:03 peter Exp $
+ * $Id: mfs_vfsops.c,v 1.19 1995/12/14 20:16:15 bde Exp $
*/
#include <sys/param.h>
@@ -68,16 +68,24 @@
# include <i386/i386/cons.h> /* console IO */
#endif
-extern int mfs_imageload __P((dev_t dev, caddr_t addr, int size));
+static int mfs_imageload __P((dev_t dev, caddr_t addr, int size));
extern int mfs_initminiroot __P((caddr_t base));
-caddr_t mfs_rootbase; /* address of mini-root in kernel virtual memory */
-u_long mfs_rootsize; /* size of mini-root in bytes */
+static caddr_t mfs_rootbase; /* address of mini-root in kernel virtual memory */
+static u_long mfs_rootsize; /* size of mini-root in bytes */
static int mfs_minor; /* used for building internal dev_t */
extern vop_t **mfs_vnodeop_p;
+static int mfs_mount __P((struct mount *mp,
+ char *path, caddr_t data, struct nameidata *ndp,
+ struct proc *p));
+static int mfs_start __P((struct mount *mp, int flags, struct proc *p));
+static int mfs_statfs __P((struct mount *mp, struct statfs *sbp,
+ struct proc *p));
+static int mfs_init __P((void));
+
/*
* mfs vfs operations.
*/
@@ -99,8 +107,8 @@ VFS_SET(mfs_vfsops, mfs, MOUNT_MFS, 0);
#ifdef MFS_ROOT
-u_char mfs_root[MFS_ROOT*1024] = "MFS Filesystem goes here";
-u_char end_mfs_root[] = "MFS Filesystem had better STOP here";
+static u_char mfs_root[MFS_ROOT*1024] = "MFS Filesystem goes here";
+static u_char end_mfs_root[] = "MFS Filesystem had better STOP here";
#ifdef MFS_AUTOLOAD
/*
@@ -114,7 +122,7 @@ u_char end_mfs_root[] = "MFS Filesystem had better STOP here";
*/
#define IMAGE_BLOCKING (32 * 1024)
-int
+static int
mfs_imageload (dev, addr, size)
dev_t dev;
caddr_t addr;
@@ -211,7 +219,7 @@ out:
* namei() if it is a genuine NULL from the user.
*/
/* ARGSUSED */
-int
+static int
mfs_mount(mp, path, data, ndp, p)
register struct mount *mp;
char *path;
@@ -421,7 +429,7 @@ success:
}
-int mfs_pri = PWAIT | PCATCH; /* XXX prob. temp */
+static int mfs_pri = PWAIT | PCATCH; /* XXX prob. temp */
/*
* Used to grab the process and keep it in the kernel to service
@@ -432,7 +440,7 @@ int mfs_pri = PWAIT | PCATCH; /* XXX prob. temp */
* address space.
*/
/* ARGSUSED */
-int
+static int
mfs_start(mp, flags, p)
struct mount *mp;
int flags;
@@ -476,7 +484,7 @@ mfs_start(mp, flags, p)
/*
* Get file system statistics.
*/
-int
+static int
mfs_statfs(mp, sbp, p)
struct mount *mp;
struct statfs *sbp;
@@ -488,3 +496,12 @@ mfs_statfs(mp, sbp, p)
sbp->f_type = MOUNT_MFS;
return (error);
}
+
+/*
+ * Memory based filesystem initialization.
+ */
+static int
+mfs_init()
+{
+ return (0);
+}
diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c
index f780d2f..62f941c 100644
--- a/sys/ufs/mfs/mfs_vnops.c
+++ b/sys/ufs/mfs/mfs_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vnops.c 8.3 (Berkeley) 9/21/93
- * $Id: mfs_vnops.c,v 1.11 1995/10/31 10:45:48 peter Exp $
+ * $Id: mfs_vnops.c,v 1.12 1995/11/09 08:14:29 bde Exp $
*/
#include <sys/param.h>
@@ -57,11 +57,20 @@ struct map mfsmap[MFS_MAPSIZE];
extern char mfsiobuf[];
#endif
+static int mfs_badop __P((void));
+static int mfs_bmap __P((struct vop_bmap_args *));
+static int mfs_close __P((struct vop_close_args *));
+static int mfs_ioctl __P((struct vop_ioctl_args *));
+static int mfs_inactive __P((struct vop_inactive_args *)); /* XXX */
+static int mfs_open __P((struct vop_open_args *));
+static int mfs_print __P((struct vop_print_args *)); /* XXX */
+static int mfs_reclaim __P((struct vop_reclaim_args *)); /* XXX */
+static int mfs_strategy __P((struct vop_strategy_args *)); /* XXX */
/*
* mfs vnode operations.
*/
vop_t **mfs_vnodeop_p;
-struct vnodeopv_entry_desc mfs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc mfs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)mfs_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)mfs_create }, /* create */
@@ -105,7 +114,7 @@ struct vnodeopv_entry_desc mfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)mfs_bwrite }, /* bwrite */
{ NULL, NULL }
};
-struct vnodeopv_desc mfs_vnodeop_opv_desc =
+static struct vnodeopv_desc mfs_vnodeop_opv_desc =
{ &mfs_vnodeop_p, mfs_vnodeop_entries };
VNODEOP_SET(mfs_vnodeop_opv_desc);
@@ -118,7 +127,7 @@ VNODEOP_SET(mfs_vnodeop_opv_desc);
* so we can tell when we are doing I/O to ourself.
*/
/* ARGSUSED */
-int
+static int
mfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -139,7 +148,7 @@ mfs_open(ap)
* Ioctl operation.
*/
/* ARGSUSED */
-int
+static int
mfs_ioctl(ap)
struct vop_ioctl_args /* {
struct vnode *a_vp;
@@ -157,7 +166,7 @@ mfs_ioctl(ap)
/*
* Pass I/O requests to the memory filesystem process.
*/
-int
+static int
mfs_strategy(ap)
struct vop_strategy_args /* {
struct buf *a_bp;
@@ -215,7 +224,7 @@ mfs_doio(bp, base)
/*
* This is a noop, simply returning what one has been given.
*/
-int
+static int
mfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -239,7 +248,7 @@ mfs_bmap(ap)
* Memory filesystem close routine
*/
/* ARGSUSED */
-int
+static int
mfs_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -288,7 +297,7 @@ mfs_close(ap)
* Memory filesystem inactive routine
*/
/* ARGSUSED */
-int
+static int
mfs_inactive(ap)
struct vop_inactive_args /* {
struct vnode *a_vp;
@@ -305,7 +314,7 @@ mfs_inactive(ap)
/*
* Reclaim a memory filesystem devvp so that it can be reused.
*/
-int
+static int
mfs_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
@@ -320,7 +329,7 @@ mfs_reclaim(ap)
/*
* Print out the contents of an mfsnode.
*/
-int
+static int
mfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@@ -336,7 +345,7 @@ mfs_print(ap)
/*
* Block device bad operation
*/
-int
+static int
mfs_badop()
{
@@ -344,11 +353,3 @@ mfs_badop()
/* NOTREACHED */
}
-/*
- * Memory based filesystem initialization.
- */
-int
-mfs_init()
-{
- return (0);
-}
OpenPOWER on IntegriCloud