summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-10-29 15:33:36 +0000
committerphk <phk@FreeBSD.org>1995-10-29 15:33:36 +0000
commit88d6fa4d4abcae38b7ea2520fe4f00203d58d677 (patch)
tree5994df578f3d766b837fe6548617062ae4661aac /sys
parentcc116c7cb7917f4b59507c90c1b0c2a45b1f6364 (diff)
downloadFreeBSD-src-88d6fa4d4abcae38b7ea2520fe4f00203d58d677.zip
FreeBSD-src-88d6fa4d4abcae38b7ea2520fe4f00203d58d677.tar.gz
Second batch of cleanup changes.
This time mostly making a lot of things static and some unused variables here and there.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/db_disasm.c98
-rw-r--r--sys/dev/snp/snp.c3
-rw-r--r--sys/fs/msdosfs/denode.h38
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c111
-rw-r--r--sys/i386/i386/db_disasm.c98
-rw-r--r--sys/i386/i386/math_emu.h60
-rw-r--r--sys/i386/i386/math_emulate.c160
-rw-r--r--sys/kern/kern_acct.c4
-rw-r--r--sys/kern/subr_log.c4
-rw-r--r--sys/kern/tty_snoop.c3
-rw-r--r--sys/kern/uipc_mbuf.c3
-rw-r--r--sys/kern/vfs_bio.c10
-rw-r--r--sys/kern/vfs_cache.c4
-rw-r--r--sys/kern/vfs_cluster.c6
-rw-r--r--sys/kern/vfs_conf.c3
-rw-r--r--sys/kern/vfs_mount.c3
-rw-r--r--sys/kern/vnode_if.pl4
-rw-r--r--sys/kern/vnode_if.sh4
-rw-r--r--sys/miscfs/kernfs/kernfs_vnops.c42
-rw-r--r--sys/msdosfs/denode.h38
-rw-r--r--sys/msdosfs/msdosfs_conv.c6
-rw-r--r--sys/msdosfs/msdosfs_fat.c4
-rw-r--r--sys/msdosfs/msdosfs_vnops.c111
-rw-r--r--sys/net/if_disc.c5
-rw-r--r--sys/net/if_ethersubr.c3
-rw-r--r--sys/net/if_ppp.c7
-rw-r--r--sys/net/if_tun.c2
-rw-r--r--sys/net/route.c3
-rw-r--r--sys/netinet/in.c3
-rw-r--r--sys/netinet/in_pcb.c3
-rw-r--r--sys/netinet/in_rmx.c3
-rw-r--r--sys/netinet/ip_fw.c4
-rw-r--r--sys/netinet/ip_mroute.c10
-rw-r--r--sys/nfs/nfs.h4
-rw-r--r--sys/nfs/nfs_bio.c6
-rw-r--r--sys/nfs/nfs_common.c4
-rw-r--r--sys/nfs/nfs_node.c3
-rw-r--r--sys/nfs/nfs_nqlease.c5
-rw-r--r--sys/nfs/nfs_serv.c29
-rw-r--r--sys/nfs/nfs_socket.c4
-rw-r--r--sys/nfs/nfs_subs.c4
-rw-r--r--sys/nfs/nfs_syscalls.c5
-rw-r--r--sys/nfs/nfs_vnops.c197
-rw-r--r--sys/nfs/nfsnode.h41
-rw-r--r--sys/nfsclient/nfs.h4
-rw-r--r--sys/nfsclient/nfs_bio.c6
-rw-r--r--sys/nfsclient/nfs_nfsiod.c5
-rw-r--r--sys/nfsclient/nfs_node.c3
-rw-r--r--sys/nfsclient/nfs_socket.c4
-rw-r--r--sys/nfsclient/nfs_subs.c4
-rw-r--r--sys/nfsclient/nfs_vnops.c197
-rw-r--r--sys/nfsclient/nfsargs.h4
-rw-r--r--sys/nfsclient/nfsnode.h41
-rw-r--r--sys/nfsclient/nfsstats.h4
-rw-r--r--sys/nfsserver/nfs.h4
-rw-r--r--sys/nfsserver/nfs_serv.c29
-rw-r--r--sys/nfsserver/nfs_srvsock.c4
-rw-r--r--sys/nfsserver/nfs_srvsubs.c4
-rw-r--r--sys/nfsserver/nfs_syscalls.c5
-rw-r--r--sys/nfsserver/nfsrvstats.h4
-rw-r--r--sys/pci/if_pdq.c8
-rw-r--r--sys/pci/pdq.c95
-rw-r--r--sys/pci/pdq_os.h29
-rw-r--r--sys/tools/vnode_if.awk4
66 files changed, 764 insertions, 866 deletions
diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c
index 8ce7365..c133831 100644
--- a/sys/amd64/amd64/db_disasm.c
+++ b/sys/amd64/amd64/db_disasm.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_disasm.c,v 1.8 1995/01/29 02:38:15 bde Exp $
+ * $Id: db_disasm.c,v 1.9 1995/05/30 07:59:20 rgrimes Exp $
*/
/*
@@ -88,7 +88,7 @@
#define X 33 /* extended FP op */
#define XA 34 /* for 'fstcw %ax' */
-struct inst {
+static struct inst {
char * i_name; /* name */
short i_has_modrm; /* has regmodrm byte */
short i_size; /* operand size */
@@ -100,7 +100,7 @@ struct inst {
#define op2(x,y) ((x)|((y)<<8))
#define op3(x,y,z) ((x)|((y)<<8)|((z)<<16))
-struct finst {
+static struct finst {
char * f_name; /* name for memory instruction */
int f_size; /* size for memory instruction */
int f_rrmode; /* mode for rr instruction */
@@ -108,7 +108,7 @@ struct finst {
(or pointer to table) */
};
-char * db_Grp6[] = {
+static char * db_Grp6[] = {
"sldt",
"str",
"lldt",
@@ -119,7 +119,7 @@ char * db_Grp6[] = {
""
};
-char * db_Grp7[] = {
+static char * db_Grp7[] = {
"sgdt",
"sidt",
"lgdt",
@@ -130,7 +130,7 @@ char * db_Grp7[] = {
"invlpg"
};
-char * db_Grp8[] = {
+static char * db_Grp8[] = {
"",
"",
"",
@@ -141,7 +141,7 @@ char * db_Grp8[] = {
"btc"
};
-struct inst db_inst_0f0x[] = {
+static struct inst db_inst_0f0x[] = {
/*00*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp6 },
/*01*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp7 },
/*02*/ { "lar", TRUE, LONG, op2(E,R), 0 },
@@ -161,7 +161,7 @@ struct inst db_inst_0f0x[] = {
/*0f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f2x[] = {
+static struct inst db_inst_0f2x[] = {
/*20*/ { "mov", TRUE, LONG, op2(CR,E), 0 }, /* use E for reg */
/*21*/ { "mov", TRUE, LONG, op2(DR,E), 0 }, /* since mod == 11 */
/*22*/ { "mov", TRUE, LONG, op2(E,CR), 0 },
@@ -181,7 +181,7 @@ struct inst db_inst_0f2x[] = {
/*2f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f8x[] = {
+static struct inst db_inst_0f8x[] = {
/*80*/ { "jo", FALSE, NONE, op1(Dl), 0 },
/*81*/ { "jno", FALSE, NONE, op1(Dl), 0 },
/*82*/ { "jb", FALSE, NONE, op1(Dl), 0 },
@@ -201,7 +201,7 @@ struct inst db_inst_0f8x[] = {
/*8f*/ { "jnle", FALSE, NONE, op1(Dl), 0 },
};
-struct inst db_inst_0f9x[] = {
+static struct inst db_inst_0f9x[] = {
/*90*/ { "seto", TRUE, NONE, op1(Eb), 0 },
/*91*/ { "setno", TRUE, NONE, op1(Eb), 0 },
/*92*/ { "setb", TRUE, NONE, op1(Eb), 0 },
@@ -221,7 +221,7 @@ struct inst db_inst_0f9x[] = {
/*9f*/ { "setnle",TRUE, NONE, op1(Eb), 0 },
};
-struct inst db_inst_0fax[] = {
+static struct inst db_inst_0fax[] = {
/*a0*/ { "push", FALSE, NONE, op1(Si), 0 },
/*a1*/ { "pop", FALSE, NONE, op1(Si), 0 },
/*a2*/ { "", FALSE, NONE, 0, 0 },
@@ -241,7 +241,7 @@ struct inst db_inst_0fax[] = {
/*a7*/ { "imul", TRUE, LONG, op2(E,R), 0 },
};
-struct inst db_inst_0fbx[] = {
+static struct inst db_inst_0fbx[] = {
/*b0*/ { "", FALSE, NONE, 0, 0 },
/*b1*/ { "", FALSE, NONE, 0, 0 },
/*b2*/ { "lss", TRUE, LONG, op2(E, R), 0 },
@@ -261,7 +261,7 @@ struct inst db_inst_0fbx[] = {
/*bf*/ { "movsw", TRUE, LONG, op2(E, R), 0 },
};
-struct inst db_inst_0fcx[] = {
+static struct inst db_inst_0fcx[] = {
/*c0*/ { "xadd", TRUE, BYTE, op2(R, E), 0 },
/*c1*/ { "xadd", TRUE, LONG, op2(R, E), 0 },
/*c2*/ { "", FALSE, NONE, 0, 0 },
@@ -280,7 +280,7 @@ struct inst db_inst_0fcx[] = {
/*cf*/ { "bswap", FALSE, LONG, op1(Ri), 0 },
};
-struct inst db_inst_0fdx[] = {
+static struct inst db_inst_0fdx[] = {
/*c0*/ { "cmpxchg",TRUE, BYTE, op2(R, E), 0 },
/*c1*/ { "cmpxchg",TRUE, LONG, op2(R, E), 0 },
/*c2*/ { "", FALSE, NONE, 0, 0 },
@@ -299,7 +299,7 @@ struct inst db_inst_0fdx[] = {
/*cf*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst *db_inst_0f[] = {
+static struct inst *db_inst_0f[] = {
db_inst_0f0x,
0,
db_inst_0f2x,
@@ -318,43 +318,43 @@ struct inst *db_inst_0f[] = {
0
};
-char * db_Esc92[] = {
+static char * db_Esc92[] = {
"fnop", "", "", "", "", "", "", ""
};
-char * db_Esc93[] = {
+static char * db_Esc93[] = {
"", "", "", "", "", "", "", ""
};
-char * db_Esc94[] = {
+static char * db_Esc94[] = {
"fchs", "fabs", "", "", "ftst", "fxam", "", ""
};
-char * db_Esc95[] = {
+static char * db_Esc95[] = {
"fld1", "fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz",""
};
-char * db_Esc96[] = {
+static char * db_Esc96[] = {
"f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp",
"fincstp"
};
-char * db_Esc97[] = {
+static char * db_Esc97[] = {
"fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos"
};
-char * db_Esca4[] = {
+static char * db_Esca4[] = {
"", "fucompp","", "", "", "", "", ""
};
-char * db_Escb4[] = {
+static char * db_Escb4[] = {
"", "", "fnclex","fninit","", "", "", ""
};
-char * db_Esce3[] = {
+static char * db_Esce3[] = {
"", "fcompp","", "", "", "", "", ""
};
-char * db_Escf4[] = {
+static char * db_Escf4[] = {
"fnstsw","", "", "", "", "", "", ""
};
-struct finst db_Esc8[] = {
+static struct finst db_Esc8[] = {
/*0*/ { "fadd", SNGL, op2(STI,ST), 0 },
/*1*/ { "fmul", SNGL, op2(STI,ST), 0 },
/*2*/ { "fcom", SNGL, op2(STI,ST), 0 },
@@ -365,7 +365,7 @@ struct finst db_Esc8[] = {
/*7*/ { "fdivr", SNGL, op2(STI,ST), 0 },
};
-struct finst db_Esc9[] = {
+static struct finst db_Esc9[] = {
/*0*/ { "fld", SNGL, op1(STI), 0 },
/*1*/ { "", NONE, op1(STI), "fxch" },
/*2*/ { "fst", SNGL, op1(X), (char *)db_Esc92 },
@@ -376,7 +376,7 @@ struct finst db_Esc9[] = {
/*7*/ { "fnstcw", NONE, op1(X), (char *)db_Esc97 },
};
-struct finst db_Esca[] = {
+static struct finst db_Esca[] = {
/*0*/ { "fiadd", WORD, 0, 0 },
/*1*/ { "fimul", WORD, 0, 0 },
/*2*/ { "ficom", WORD, 0, 0 },
@@ -387,7 +387,7 @@ struct finst db_Esca[] = {
/*7*/ { "fidivr", WORD, 0, 0 }
};
-struct finst db_Escb[] = {
+static struct finst db_Escb[] = {
/*0*/ { "fild", WORD, 0, 0 },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fist", WORD, 0, 0 },
@@ -398,7 +398,7 @@ struct finst db_Escb[] = {
/*7*/ { "fstp", EXTR, 0, 0 },
};
-struct finst db_Escc[] = {
+static struct finst db_Escc[] = {
/*0*/ { "fadd", DBLR, op2(ST,STI), 0 },
/*1*/ { "fmul", DBLR, op2(ST,STI), 0 },
/*2*/ { "fcom", DBLR, op2(ST,STI), 0 },
@@ -409,7 +409,7 @@ struct finst db_Escc[] = {
/*7*/ { "fdivr", DBLR, op2(ST,STI), "fdiv" },
};
-struct finst db_Escd[] = {
+static struct finst db_Escd[] = {
/*0*/ { "fld", DBLR, op1(STI), "ffree" },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fst", DBLR, op1(STI), 0 },
@@ -420,7 +420,7 @@ struct finst db_Escd[] = {
/*7*/ { "fnstsw", NONE, 0, 0 },
};
-struct finst db_Esce[] = {
+static struct finst db_Esce[] = {
/*0*/ { "fiadd", LONG, op2(ST,STI), "faddp" },
/*1*/ { "fimul", LONG, op2(ST,STI), "fmulp" },
/*2*/ { "ficom", LONG, 0, 0 },
@@ -431,7 +431,7 @@ struct finst db_Esce[] = {
/*7*/ { "fidivr", LONG, op2(ST,STI), "fdivp" },
};
-struct finst db_Escf[] = {
+static struct finst db_Escf[] = {
/*0*/ { "fild", LONG, 0, 0 },
/*1*/ { "", LONG, 0, 0 },
/*2*/ { "fist", LONG, 0, 0 },
@@ -442,12 +442,12 @@ struct finst db_Escf[] = {
/*7*/ { "fstp", QUAD, 0, 0 },
};
-struct finst *db_Esc_inst[] = {
+static struct finst *db_Esc_inst[] = {
db_Esc8, db_Esc9, db_Esca, db_Escb,
db_Escc, db_Escd, db_Esce, db_Escf
};
-char * db_Grp1[] = {
+static char * db_Grp1[] = {
"add",
"or",
"adc",
@@ -458,7 +458,7 @@ char * db_Grp1[] = {
"cmp"
};
-char * db_Grp2[] = {
+static char * db_Grp2[] = {
"rol",
"ror",
"rcl",
@@ -469,7 +469,7 @@ char * db_Grp2[] = {
"sar"
};
-struct inst db_Grp3[] = {
+static struct inst db_Grp3[] = {
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "not", TRUE, NONE, op1(E), 0 },
@@ -480,7 +480,7 @@ struct inst db_Grp3[] = {
{ "idiv", TRUE, NONE, op2(E,A), 0 },
};
-struct inst db_Grp4[] = {
+static struct inst db_Grp4[] = {
{ "inc", TRUE, BYTE, op1(E), 0 },
{ "dec", TRUE, BYTE, op1(E), 0 },
{ "", TRUE, NONE, 0, 0 },
@@ -491,7 +491,7 @@ struct inst db_Grp4[] = {
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_Grp5[] = {
+static struct inst db_Grp5[] = {
{ "inc", TRUE, LONG, op1(E), 0 },
{ "dec", TRUE, LONG, op1(E), 0 },
{ "call", TRUE, NONE, op1(Eind),0 },
@@ -502,7 +502,7 @@ struct inst db_Grp5[] = {
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_inst_table[256] = {
+static struct inst db_inst_table[256] = {
/*00*/ { "add", TRUE, BYTE, op2(R, E), 0 },
/*01*/ { "add", TRUE, LONG, op2(R, E), 0 },
/*02*/ { "add", TRUE, BYTE, op2(E, R), 0 },
@@ -793,7 +793,7 @@ struct inst db_inst_table[256] = {
/*ff*/ { "", TRUE, NONE, 0, (char *)db_Grp5 },
};
-struct inst db_bad_inst =
+static struct inst db_bad_inst =
{ "???", FALSE, NONE, 0, 0 }
;
@@ -805,7 +805,7 @@ struct inst db_bad_inst =
#define sib_index(byte) (((byte)>>3)&0x7)
#define sib_base(byte) ((byte)&0x7)
-struct i_addr {
+static struct i_addr {
int is_reg; /* if reg, reg number is in 'disp' */
int disp;
char * base;
@@ -813,7 +813,7 @@ struct i_addr {
int ss;
};
-char * db_index_reg_16[8] = {
+static char * db_index_reg_16[8] = {
"%bx,%si",
"%bx,%di",
"%bp,%si",
@@ -824,20 +824,20 @@ char * db_index_reg_16[8] = {
"%bx"
};
-char * db_reg[3][8] = {
+static char * db_reg[3][8] = {
"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
"%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
"%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi"
};
-char * db_seg_reg[8] = {
+static char * db_seg_reg[8] = {
"%es", "%cs", "%ss", "%ds", "%fs", "%gs", "", ""
};
/*
* lengths for size attributes
*/
-int db_lengths[] = {
+static int db_lengths[] = {
1, /* BYTE */
2, /* WORD */
4, /* LONG */
@@ -854,7 +854,7 @@ int db_lengths[] = {
/*
* Read address at location and return updated location.
*/
-db_addr_t
+static db_addr_t
db_read_address(loc, short_addr, regmodrm, addrp)
db_addr_t loc;
int short_addr;
@@ -939,7 +939,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
return (loc);
}
-void
+static void
db_print_address(seg, size, addrp)
char * seg;
int size;
@@ -969,7 +969,7 @@ db_print_address(seg, size, addrp)
* Disassemble floating-point ("escape") instruction
* and return updated location.
*/
-db_addr_t
+static db_addr_t
db_disasm_esc(loc, inst, short_addr, size, seg)
db_addr_t loc;
int inst;
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index abfc765..77c1596 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -182,7 +182,6 @@ snpin(snp, buf, n)
int s, len, nblen;
caddr_t from, to;
char *nbuf;
- struct tty *tp;
if (n == 0)
@@ -471,7 +470,7 @@ snpselect(dev, rw, p)
int rw;
struct proc *p;
{
- int unit = minor(dev), s;
+ int unit = minor(dev);
struct snoop *snp = &snoopsw[unit];
if (rw != FREAD)
diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h
index 804d4f6..b9ea01c 100644
--- a/sys/fs/msdosfs/denode.h
+++ b/sys/fs/msdosfs/denode.h
@@ -1,4 +1,4 @@
-/* $Id: denode.h,v 1.5 1995/05/30 08:07:32 rgrimes Exp $ */
+/* $Id: denode.h,v 1.6 1995/08/02 12:59:47 dfr Exp $ */
/* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */
/*-
@@ -227,45 +227,9 @@ struct defid {
};
extern int (**msdosfs_vnodeop_p)();
-
-/*
- * Prototypes for MSDOSFS vnode operations
- */
int msdosfs_lookup __P((struct vop_lookup_args *));
-int msdosfs_create __P((struct vop_create_args *));
-int msdosfs_mknod __P((struct vop_mknod_args *));
-int msdosfs_open __P((struct vop_open_args *));
-int msdosfs_close __P((struct vop_close_args *));
-int msdosfs_access __P((struct vop_access_args *));
-int msdosfs_getattr __P((struct vop_getattr_args *));
-int msdosfs_setattr __P((struct vop_setattr_args *));
-int msdosfs_read __P((struct vop_read_args *));
-int msdosfs_write __P((struct vop_write_args *));
-int msdosfs_ioctl __P((struct vop_ioctl_args *));
-int msdosfs_select __P((struct vop_select_args *));
-int msdosfs_mmap __P((struct vop_mmap_args *));
-int msdosfs_fsync __P((struct vop_fsync_args *));
-int msdosfs_seek __P((struct vop_seek_args *));
-int msdosfs_remove __P((struct vop_remove_args *));
-int msdosfs_link __P((struct vop_link_args *));
-int msdosfs_rename __P((struct vop_rename_args *));
-int msdosfs_mkdir __P((struct vop_mkdir_args *));
-int msdosfs_rmdir __P((struct vop_rmdir_args *));
-int msdosfs_symlink __P((struct vop_symlink_args *));
-int msdosfs_readdir __P((struct vop_readdir_args *));
-int msdosfs_readlink __P((struct vop_readlink_args *));
-int msdosfs_abortop __P((struct vop_abortop_args *));
int msdosfs_inactive __P((struct vop_inactive_args *));
int msdosfs_reclaim __P((struct vop_reclaim_args *));
-int msdosfs_lock __P((struct vop_lock_args *));
-int msdosfs_unlock __P((struct vop_unlock_args *));
-int msdosfs_bmap __P((struct vop_bmap_args *));
-int msdosfs_strategy __P((struct vop_strategy_args *));
-int msdosfs_print __P((struct vop_print_args *));
-int msdosfs_islocked __P((struct vop_islocked_args *));
-int msdosfs_advlock __P((struct vop_advlock_args *));
-int msdosfs_reallocblks __P((struct vop_reallocblks_args *));
-
/*
* Internal service routine prototypes.
*/
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index 8899982..827d651 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_conv.c,v 1.4 1995/03/29 18:48:06 ache Exp $ */
+/* $Id: msdosfs_conv.c,v 1.5 1995/05/30 08:07:36 rgrimes Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
/*
@@ -141,8 +141,8 @@ dos2unixtime(dd, dt, tsp)
struct timespec *tsp;
{
u_long seconds;
- u_long m, month;
- u_long y, year;
+ u_long month;
+ u_long year;
u_long days;
u_short *months;
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index b43f959..10f397a 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_fat.c,v 1.6 1995/04/11 16:43:20 bde Exp $ */
+/* $Id: msdosfs_fat.c,v 1.7 1995/05/30 08:07:40 rgrimes Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
/*-
@@ -300,7 +300,7 @@ void fc_purge(dep, frcn)
* bp - addr of modified fat block
* fatbn - block number relative to begin of filesystem of the modified fat block.
*/
-void
+static void
updatefats(pmp, bp, fatbn)
struct msdosfsmount *pmp;
struct buf *bp;
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index 3521f3c..b501a5d 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_vnops.c,v 1.24 1995/10/07 10:14:12 bde Exp $ */
+/* $Id: msdosfs_vnops.c,v 1.25 1995/10/22 09:32:37 davidg Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@@ -71,6 +71,42 @@
#include <msdosfs/denode.h>
#include <msdosfs/msdosfsmount.h>
#include <msdosfs/fat.h>
+
+/*
+ * Prototypes for MSDOSFS vnode operations
+ */
+static int msdosfs_create __P((struct vop_create_args *));
+static int msdosfs_mknod __P((struct vop_mknod_args *));
+static int msdosfs_open __P((struct vop_open_args *));
+static int msdosfs_close __P((struct vop_close_args *));
+static int msdosfs_access __P((struct vop_access_args *));
+static int msdosfs_getattr __P((struct vop_getattr_args *));
+static int msdosfs_setattr __P((struct vop_setattr_args *));
+static int msdosfs_read __P((struct vop_read_args *));
+static int msdosfs_write __P((struct vop_write_args *));
+static int msdosfs_ioctl __P((struct vop_ioctl_args *));
+static int msdosfs_select __P((struct vop_select_args *));
+static int msdosfs_mmap __P((struct vop_mmap_args *));
+static int msdosfs_fsync __P((struct vop_fsync_args *));
+static int msdosfs_seek __P((struct vop_seek_args *));
+static int msdosfs_remove __P((struct vop_remove_args *));
+static int msdosfs_link __P((struct vop_link_args *));
+static int msdosfs_rename __P((struct vop_rename_args *));
+static int msdosfs_mkdir __P((struct vop_mkdir_args *));
+static int msdosfs_rmdir __P((struct vop_rmdir_args *));
+static int msdosfs_symlink __P((struct vop_symlink_args *));
+static int msdosfs_readdir __P((struct vop_readdir_args *));
+static int msdosfs_readlink __P((struct vop_readlink_args *));
+static int msdosfs_abortop __P((struct vop_abortop_args *));
+static int msdosfs_lock __P((struct vop_lock_args *));
+static int msdosfs_unlock __P((struct vop_unlock_args *));
+static int msdosfs_bmap __P((struct vop_bmap_args *));
+static int msdosfs_strategy __P((struct vop_strategy_args *));
+static int msdosfs_print __P((struct vop_print_args *));
+static int msdosfs_islocked __P((struct vop_islocked_args *));
+static int msdosfs_advlock __P((struct vop_advlock_args *));
+static int msdosfs_reallocblks __P((struct vop_reallocblks_args *));
+
/*
* Some general notes:
*
@@ -95,7 +131,7 @@
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or
* only if the SAVESTART bit in cn_flags is clear on success.
*/
-int
+static int
msdosfs_create(ap)
struct vop_create_args /* {
struct vnode *a_dvp;
@@ -146,7 +182,7 @@ msdosfs_create(ap)
return error;
}
-int
+static int
msdosfs_mknod(ap)
struct vop_mknod_args /* {
struct vnode *a_dvp;
@@ -175,7 +211,7 @@ msdosfs_mknod(ap)
return error;
}
-int
+static int
msdosfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -187,7 +223,7 @@ msdosfs_open(ap)
return 0;
}
-int
+static int
msdosfs_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -204,7 +240,7 @@ msdosfs_close(ap)
return 0;
}
-int
+static int
msdosfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -280,7 +316,7 @@ msdosfs_access(ap)
return (file_mode & mask) == mask ? 0 : EACCES;
}
-int
+static int
msdosfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -338,7 +374,7 @@ msdosfs_getattr(ap)
return 0;
}
-int
+static int
msdosfs_setattr(ap)
struct vop_setattr_args /* {
struct vnode *a_vp;
@@ -462,7 +498,7 @@ msdosfs_setattr(ap)
return error;
}
-int
+static int
msdosfs_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -555,7 +591,7 @@ msdosfs_read(ap)
/*
* Write data to a file or directory.
*/
-int
+static int
msdosfs_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -769,7 +805,7 @@ errexit:
return error;
}
-int
+static int
msdosfs_ioctl(ap)
struct vop_ioctl_args /* {
struct vnode *a_vp;
@@ -783,7 +819,7 @@ msdosfs_ioctl(ap)
return ENOTTY;
}
-int
+static int
msdosfs_select(ap)
struct vop_select_args /* {
struct vnode *a_vp;
@@ -796,7 +832,7 @@ msdosfs_select(ap)
return 1; /* DOS filesystems never block? */
}
-int
+static int
msdosfs_mmap(ap)
struct vop_mmap_args /* {
struct vnode *a_vp;
@@ -814,7 +850,7 @@ msdosfs_mmap(ap)
* This function is worthless for vnodes that represent directories. Maybe we
* could just do a sync if they try an fsync on a directory file.
*/
-int
+static int
msdosfs_fsync(ap)
struct vop_fsync_args /* {
struct vnode *a_vp;
@@ -866,7 +902,7 @@ loop:
* Now the whole work of extending a file is done in the write function.
* So nothing to do here.
*/
-int
+static int
msdosfs_seek(ap)
struct vop_seek_args /* {
struct vnode *a_vp;
@@ -878,7 +914,7 @@ msdosfs_seek(ap)
return 0;
}
-int
+static int
msdosfs_remove(ap)
struct vop_remove_args /* {
struct vnode *a_dvp;
@@ -908,7 +944,7 @@ msdosfs_remove(ap)
* msdosfs_lookup() with create and lockparent, the parent is locked so we
* have to free it before we return the error.
*/
-int
+static int
msdosfs_link(ap)
struct vop_link_args /* {
struct vnode *a_tdvp;
@@ -972,7 +1008,7 @@ msdosfs_link(ap)
* componentname structures is freed, there may be some memory bleeding
* for each rename done.
*/
-int
+static int
msdosfs_rename(ap)
struct vop_rename_args /* {
struct vnode *a_fdvp;
@@ -1227,7 +1263,7 @@ bad: ;
return error;
}
-struct {
+static struct {
struct direntry dot;
struct direntry dotdot;
} dosdirtemplate = {
@@ -1248,7 +1284,7 @@ struct {
}
};
-int
+static int
msdosfs_mkdir(ap)
struct vop_mkdir_args /* {
struct vnode *a_dvp;
@@ -1350,7 +1386,7 @@ msdosfs_mkdir(ap)
return error;
}
-int
+static int
msdosfs_rmdir(ap)
struct vop_rmdir_args /* {
struct vnode *a_dvp;
@@ -1419,7 +1455,7 @@ out: ;
/*
* DOS filesystems don't know what symlinks are.
*/
-int
+static int
msdosfs_symlink(ap)
struct vop_symlink_args /* {
struct vnode *a_dvp;
@@ -1439,7 +1475,7 @@ msdosfs_symlink(ap)
* in a dos filesystem. Dos doesn't provide these. Note that each entry
* must be the same size as a dos directory entry (32 bytes).
*/
-struct dos_dirent {
+static struct dos_dirent {
u_long d_fileno;
u_short d_reclen;
u_char d_type;
@@ -1463,7 +1499,7 @@ struct dos_dirent {
}
};
-int
+static int
msdosfs_readdir(ap)
struct vop_readdir_args /* {
struct vnode *a_vp;
@@ -1737,7 +1773,7 @@ out: ;
/*
* DOS filesystems don't know what symlinks are.
*/
-int
+static int
msdosfs_readlink(ap)
struct vop_readlink_args /* {
struct vnode *a_vp;
@@ -1748,7 +1784,7 @@ msdosfs_readlink(ap)
return EINVAL;
}
-int
+static int
msdosfs_abortop(ap)
struct vop_abortop_args /* {
struct vnode *a_dvp;
@@ -1760,7 +1796,7 @@ msdosfs_abortop(ap)
return 0;
}
-int
+static int
msdosfs_lock(ap)
struct vop_lock_args /* {
struct vnode *a_vp;
@@ -1781,7 +1817,7 @@ msdosfs_lock(ap)
return 0;
}
-int
+static int
msdosfs_unlock(ap)
struct vop_unlock_args /* {
struct vnode *vp;
@@ -1800,7 +1836,7 @@ msdosfs_unlock(ap)
return 0;
}
-int
+static int
msdosfs_islocked(ap)
struct vop_islocked_args /* {
struct vnode *a_vp;
@@ -1816,7 +1852,7 @@ msdosfs_islocked(ap)
* containing the file of interest
* bnp - address of where to return the filesystem relative block number
*/
-int
+static int
msdosfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -1845,7 +1881,8 @@ msdosfs_bmap(ap)
return pcbmap(dep, ap->a_bn, ap->a_bnp, 0);
}
-int msdosfs_reallocblks(ap)
+static int
+msdosfs_reallocblks(ap)
struct vop_reallocblks_args /* {
struct vnode *a_vp;
struct cluster_save *a_buflist;
@@ -1855,7 +1892,7 @@ int msdosfs_reallocblks(ap)
return ENOSPC;
}
-int
+static int
msdosfs_strategy(ap)
struct vop_strategy_args /* {
struct buf *a_bp;
@@ -1897,7 +1934,7 @@ msdosfs_strategy(ap)
return 0;
}
-int
+static int
msdosfs_print(ap)
struct vop_print_args /* {
struct vnode *vp;
@@ -1920,7 +1957,7 @@ msdosfs_print(ap)
return 0;
}
-int
+static int
msdosfs_advlock(ap)
struct vop_advlock_args /* {
struct vnode *a_vp;
@@ -1933,7 +1970,7 @@ msdosfs_advlock(ap)
return EINVAL; /* we don't do locking yet */
}
-int
+static int
msdosfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
@@ -1964,7 +2001,7 @@ msdosfs_pathconf(ap)
/* Global vfs data structures for msdosfs */
int (**msdosfs_vnodeop_p)();
-struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, msdosfs_lookup }, /* lookup */
{ &vop_create_desc, msdosfs_create }, /* create */
@@ -2004,7 +2041,7 @@ struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc *)NULL, (int (*)())NULL }
};
-struct vnodeopv_desc msdosfs_vnodeop_opv_desc =
+static struct vnodeopv_desc msdosfs_vnodeop_opv_desc =
{ &msdosfs_vnodeop_p, msdosfs_vnodeop_entries };
VNODEOP_SET(msdosfs_vnodeop_opv_desc);
diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c
index 8ce7365..c133831 100644
--- a/sys/i386/i386/db_disasm.c
+++ b/sys/i386/i386/db_disasm.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_disasm.c,v 1.8 1995/01/29 02:38:15 bde Exp $
+ * $Id: db_disasm.c,v 1.9 1995/05/30 07:59:20 rgrimes Exp $
*/
/*
@@ -88,7 +88,7 @@
#define X 33 /* extended FP op */
#define XA 34 /* for 'fstcw %ax' */
-struct inst {
+static struct inst {
char * i_name; /* name */
short i_has_modrm; /* has regmodrm byte */
short i_size; /* operand size */
@@ -100,7 +100,7 @@ struct inst {
#define op2(x,y) ((x)|((y)<<8))
#define op3(x,y,z) ((x)|((y)<<8)|((z)<<16))
-struct finst {
+static struct finst {
char * f_name; /* name for memory instruction */
int f_size; /* size for memory instruction */
int f_rrmode; /* mode for rr instruction */
@@ -108,7 +108,7 @@ struct finst {
(or pointer to table) */
};
-char * db_Grp6[] = {
+static char * db_Grp6[] = {
"sldt",
"str",
"lldt",
@@ -119,7 +119,7 @@ char * db_Grp6[] = {
""
};
-char * db_Grp7[] = {
+static char * db_Grp7[] = {
"sgdt",
"sidt",
"lgdt",
@@ -130,7 +130,7 @@ char * db_Grp7[] = {
"invlpg"
};
-char * db_Grp8[] = {
+static char * db_Grp8[] = {
"",
"",
"",
@@ -141,7 +141,7 @@ char * db_Grp8[] = {
"btc"
};
-struct inst db_inst_0f0x[] = {
+static struct inst db_inst_0f0x[] = {
/*00*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp6 },
/*01*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp7 },
/*02*/ { "lar", TRUE, LONG, op2(E,R), 0 },
@@ -161,7 +161,7 @@ struct inst db_inst_0f0x[] = {
/*0f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f2x[] = {
+static struct inst db_inst_0f2x[] = {
/*20*/ { "mov", TRUE, LONG, op2(CR,E), 0 }, /* use E for reg */
/*21*/ { "mov", TRUE, LONG, op2(DR,E), 0 }, /* since mod == 11 */
/*22*/ { "mov", TRUE, LONG, op2(E,CR), 0 },
@@ -181,7 +181,7 @@ struct inst db_inst_0f2x[] = {
/*2f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f8x[] = {
+static struct inst db_inst_0f8x[] = {
/*80*/ { "jo", FALSE, NONE, op1(Dl), 0 },
/*81*/ { "jno", FALSE, NONE, op1(Dl), 0 },
/*82*/ { "jb", FALSE, NONE, op1(Dl), 0 },
@@ -201,7 +201,7 @@ struct inst db_inst_0f8x[] = {
/*8f*/ { "jnle", FALSE, NONE, op1(Dl), 0 },
};
-struct inst db_inst_0f9x[] = {
+static struct inst db_inst_0f9x[] = {
/*90*/ { "seto", TRUE, NONE, op1(Eb), 0 },
/*91*/ { "setno", TRUE, NONE, op1(Eb), 0 },
/*92*/ { "setb", TRUE, NONE, op1(Eb), 0 },
@@ -221,7 +221,7 @@ struct inst db_inst_0f9x[] = {
/*9f*/ { "setnle",TRUE, NONE, op1(Eb), 0 },
};
-struct inst db_inst_0fax[] = {
+static struct inst db_inst_0fax[] = {
/*a0*/ { "push", FALSE, NONE, op1(Si), 0 },
/*a1*/ { "pop", FALSE, NONE, op1(Si), 0 },
/*a2*/ { "", FALSE, NONE, 0, 0 },
@@ -241,7 +241,7 @@ struct inst db_inst_0fax[] = {
/*a7*/ { "imul", TRUE, LONG, op2(E,R), 0 },
};
-struct inst db_inst_0fbx[] = {
+static struct inst db_inst_0fbx[] = {
/*b0*/ { "", FALSE, NONE, 0, 0 },
/*b1*/ { "", FALSE, NONE, 0, 0 },
/*b2*/ { "lss", TRUE, LONG, op2(E, R), 0 },
@@ -261,7 +261,7 @@ struct inst db_inst_0fbx[] = {
/*bf*/ { "movsw", TRUE, LONG, op2(E, R), 0 },
};
-struct inst db_inst_0fcx[] = {
+static struct inst db_inst_0fcx[] = {
/*c0*/ { "xadd", TRUE, BYTE, op2(R, E), 0 },
/*c1*/ { "xadd", TRUE, LONG, op2(R, E), 0 },
/*c2*/ { "", FALSE, NONE, 0, 0 },
@@ -280,7 +280,7 @@ struct inst db_inst_0fcx[] = {
/*cf*/ { "bswap", FALSE, LONG, op1(Ri), 0 },
};
-struct inst db_inst_0fdx[] = {
+static struct inst db_inst_0fdx[] = {
/*c0*/ { "cmpxchg",TRUE, BYTE, op2(R, E), 0 },
/*c1*/ { "cmpxchg",TRUE, LONG, op2(R, E), 0 },
/*c2*/ { "", FALSE, NONE, 0, 0 },
@@ -299,7 +299,7 @@ struct inst db_inst_0fdx[] = {
/*cf*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst *db_inst_0f[] = {
+static struct inst *db_inst_0f[] = {
db_inst_0f0x,
0,
db_inst_0f2x,
@@ -318,43 +318,43 @@ struct inst *db_inst_0f[] = {
0
};
-char * db_Esc92[] = {
+static char * db_Esc92[] = {
"fnop", "", "", "", "", "", "", ""
};
-char * db_Esc93[] = {
+static char * db_Esc93[] = {
"", "", "", "", "", "", "", ""
};
-char * db_Esc94[] = {
+static char * db_Esc94[] = {
"fchs", "fabs", "", "", "ftst", "fxam", "", ""
};
-char * db_Esc95[] = {
+static char * db_Esc95[] = {
"fld1", "fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz",""
};
-char * db_Esc96[] = {
+static char * db_Esc96[] = {
"f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp",
"fincstp"
};
-char * db_Esc97[] = {
+static char * db_Esc97[] = {
"fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos"
};
-char * db_Esca4[] = {
+static char * db_Esca4[] = {
"", "fucompp","", "", "", "", "", ""
};
-char * db_Escb4[] = {
+static char * db_Escb4[] = {
"", "", "fnclex","fninit","", "", "", ""
};
-char * db_Esce3[] = {
+static char * db_Esce3[] = {
"", "fcompp","", "", "", "", "", ""
};
-char * db_Escf4[] = {
+static char * db_Escf4[] = {
"fnstsw","", "", "", "", "", "", ""
};
-struct finst db_Esc8[] = {
+static struct finst db_Esc8[] = {
/*0*/ { "fadd", SNGL, op2(STI,ST), 0 },
/*1*/ { "fmul", SNGL, op2(STI,ST), 0 },
/*2*/ { "fcom", SNGL, op2(STI,ST), 0 },
@@ -365,7 +365,7 @@ struct finst db_Esc8[] = {
/*7*/ { "fdivr", SNGL, op2(STI,ST), 0 },
};
-struct finst db_Esc9[] = {
+static struct finst db_Esc9[] = {
/*0*/ { "fld", SNGL, op1(STI), 0 },
/*1*/ { "", NONE, op1(STI), "fxch" },
/*2*/ { "fst", SNGL, op1(X), (char *)db_Esc92 },
@@ -376,7 +376,7 @@ struct finst db_Esc9[] = {
/*7*/ { "fnstcw", NONE, op1(X), (char *)db_Esc97 },
};
-struct finst db_Esca[] = {
+static struct finst db_Esca[] = {
/*0*/ { "fiadd", WORD, 0, 0 },
/*1*/ { "fimul", WORD, 0, 0 },
/*2*/ { "ficom", WORD, 0, 0 },
@@ -387,7 +387,7 @@ struct finst db_Esca[] = {
/*7*/ { "fidivr", WORD, 0, 0 }
};
-struct finst db_Escb[] = {
+static struct finst db_Escb[] = {
/*0*/ { "fild", WORD, 0, 0 },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fist", WORD, 0, 0 },
@@ -398,7 +398,7 @@ struct finst db_Escb[] = {
/*7*/ { "fstp", EXTR, 0, 0 },
};
-struct finst db_Escc[] = {
+static struct finst db_Escc[] = {
/*0*/ { "fadd", DBLR, op2(ST,STI), 0 },
/*1*/ { "fmul", DBLR, op2(ST,STI), 0 },
/*2*/ { "fcom", DBLR, op2(ST,STI), 0 },
@@ -409,7 +409,7 @@ struct finst db_Escc[] = {
/*7*/ { "fdivr", DBLR, op2(ST,STI), "fdiv" },
};
-struct finst db_Escd[] = {
+static struct finst db_Escd[] = {
/*0*/ { "fld", DBLR, op1(STI), "ffree" },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fst", DBLR, op1(STI), 0 },
@@ -420,7 +420,7 @@ struct finst db_Escd[] = {
/*7*/ { "fnstsw", NONE, 0, 0 },
};
-struct finst db_Esce[] = {
+static struct finst db_Esce[] = {
/*0*/ { "fiadd", LONG, op2(ST,STI), "faddp" },
/*1*/ { "fimul", LONG, op2(ST,STI), "fmulp" },
/*2*/ { "ficom", LONG, 0, 0 },
@@ -431,7 +431,7 @@ struct finst db_Esce[] = {
/*7*/ { "fidivr", LONG, op2(ST,STI), "fdivp" },
};
-struct finst db_Escf[] = {
+static struct finst db_Escf[] = {
/*0*/ { "fild", LONG, 0, 0 },
/*1*/ { "", LONG, 0, 0 },
/*2*/ { "fist", LONG, 0, 0 },
@@ -442,12 +442,12 @@ struct finst db_Escf[] = {
/*7*/ { "fstp", QUAD, 0, 0 },
};
-struct finst *db_Esc_inst[] = {
+static struct finst *db_Esc_inst[] = {
db_Esc8, db_Esc9, db_Esca, db_Escb,
db_Escc, db_Escd, db_Esce, db_Escf
};
-char * db_Grp1[] = {
+static char * db_Grp1[] = {
"add",
"or",
"adc",
@@ -458,7 +458,7 @@ char * db_Grp1[] = {
"cmp"
};
-char * db_Grp2[] = {
+static char * db_Grp2[] = {
"rol",
"ror",
"rcl",
@@ -469,7 +469,7 @@ char * db_Grp2[] = {
"sar"
};
-struct inst db_Grp3[] = {
+static struct inst db_Grp3[] = {
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "not", TRUE, NONE, op1(E), 0 },
@@ -480,7 +480,7 @@ struct inst db_Grp3[] = {
{ "idiv", TRUE, NONE, op2(E,A), 0 },
};
-struct inst db_Grp4[] = {
+static struct inst db_Grp4[] = {
{ "inc", TRUE, BYTE, op1(E), 0 },
{ "dec", TRUE, BYTE, op1(E), 0 },
{ "", TRUE, NONE, 0, 0 },
@@ -491,7 +491,7 @@ struct inst db_Grp4[] = {
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_Grp5[] = {
+static struct inst db_Grp5[] = {
{ "inc", TRUE, LONG, op1(E), 0 },
{ "dec", TRUE, LONG, op1(E), 0 },
{ "call", TRUE, NONE, op1(Eind),0 },
@@ -502,7 +502,7 @@ struct inst db_Grp5[] = {
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_inst_table[256] = {
+static struct inst db_inst_table[256] = {
/*00*/ { "add", TRUE, BYTE, op2(R, E), 0 },
/*01*/ { "add", TRUE, LONG, op2(R, E), 0 },
/*02*/ { "add", TRUE, BYTE, op2(E, R), 0 },
@@ -793,7 +793,7 @@ struct inst db_inst_table[256] = {
/*ff*/ { "", TRUE, NONE, 0, (char *)db_Grp5 },
};
-struct inst db_bad_inst =
+static struct inst db_bad_inst =
{ "???", FALSE, NONE, 0, 0 }
;
@@ -805,7 +805,7 @@ struct inst db_bad_inst =
#define sib_index(byte) (((byte)>>3)&0x7)
#define sib_base(byte) ((byte)&0x7)
-struct i_addr {
+static struct i_addr {
int is_reg; /* if reg, reg number is in 'disp' */
int disp;
char * base;
@@ -813,7 +813,7 @@ struct i_addr {
int ss;
};
-char * db_index_reg_16[8] = {
+static char * db_index_reg_16[8] = {
"%bx,%si",
"%bx,%di",
"%bp,%si",
@@ -824,20 +824,20 @@ char * db_index_reg_16[8] = {
"%bx"
};
-char * db_reg[3][8] = {
+static char * db_reg[3][8] = {
"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
"%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
"%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi"
};
-char * db_seg_reg[8] = {
+static char * db_seg_reg[8] = {
"%es", "%cs", "%ss", "%ds", "%fs", "%gs", "", ""
};
/*
* lengths for size attributes
*/
-int db_lengths[] = {
+static int db_lengths[] = {
1, /* BYTE */
2, /* WORD */
4, /* LONG */
@@ -854,7 +854,7 @@ int db_lengths[] = {
/*
* Read address at location and return updated location.
*/
-db_addr_t
+static db_addr_t
db_read_address(loc, short_addr, regmodrm, addrp)
db_addr_t loc;
int short_addr;
@@ -939,7 +939,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
return (loc);
}
-void
+static void
db_print_address(seg, size, addrp)
char * seg;
int size;
@@ -969,7 +969,7 @@ db_print_address(seg, size, addrp)
* Disassemble floating-point ("escape") instruction
* and return updated location.
*/
-db_addr_t
+static db_addr_t
db_disasm_esc(loc, inst, short_addr, size, seg)
db_addr_t loc;
int inst;
diff --git a/sys/i386/i386/math_emu.h b/sys/i386/i386/math_emu.h
index 453a903..322f6a5 100644
--- a/sys/i386/i386/math_emu.h
+++ b/sys/i386/i386/math_emu.h
@@ -3,7 +3,7 @@
*
* (C) 1991 Linus Torvalds
*
- * $Id$
+ * $Id: math_emu.h,v 1.2 1993/10/16 14:15:02 rgrimes Exp $
*/
#ifndef _LINUX_MATH_EMU_H
#define _LINUX_MATH_EMU_H
@@ -105,52 +105,52 @@ struct i387_struct {
/* ea.c */
-char * ea(struct trapframe *, unsigned short);
+static char * ea(struct trapframe *, unsigned short);
/* convert.c */
-void frndint(const temp_real * __a, temp_real * __b);
-void Fscale(const temp_real *, const temp_real *, temp_real *);
-void short_to_temp(const short_real * __a, temp_real * __b);
-void long_to_temp(const long_real * __a, temp_real * __b);
-void temp_to_short(const temp_real * __a, short_real * __b);
-void temp_to_long(const temp_real * __a, long_real * __b);
-void real_to_int(const temp_real * __a, temp_int * __b);
-void int_to_real(const temp_int * __a, temp_real * __b);
+static void frndint(const temp_real * __a, temp_real * __b);
+static void Fscale(const temp_real *, const temp_real *, temp_real *);
+static void short_to_temp(const short_real * __a, temp_real * __b);
+static void long_to_temp(const long_real * __a, temp_real * __b);
+static void temp_to_short(const temp_real * __a, short_real * __b);
+static void temp_to_long(const temp_real * __a, long_real * __b);
+static void real_to_int(const temp_real * __a, temp_int * __b);
+static void int_to_real(const temp_int * __a, temp_real * __b);
/* get_put.c */
-void get_short_real(temp_real *, struct trapframe *, unsigned short);
-void get_long_real(temp_real *, struct trapframe *, unsigned short);
-void get_temp_real(temp_real *, struct trapframe *, unsigned short);
-void get_short_int(temp_real *, struct trapframe *, unsigned short);
-void get_long_int(temp_real *, struct trapframe *, unsigned short);
-void get_longlong_int(temp_real *, struct trapframe *, unsigned short);
-void get_BCD(temp_real *, struct trapframe *, unsigned short);
-void put_short_real(const temp_real *, struct trapframe *, unsigned short);
-void put_long_real(const temp_real *, struct trapframe *, unsigned short);
-void put_temp_real(const temp_real *, struct trapframe *, unsigned short);
-void put_short_int(const temp_real *, struct trapframe *, unsigned short);
-void put_long_int(const temp_real *, struct trapframe *, unsigned short);
-void put_longlong_int(const temp_real *, struct trapframe *, unsigned short);
-void put_BCD(const temp_real *, struct trapframe *, unsigned short);
+static void get_short_real(temp_real *, struct trapframe *, unsigned short);
+static void get_long_real(temp_real *, struct trapframe *, unsigned short);
+static void get_temp_real(temp_real *, struct trapframe *, unsigned short);
+static void get_short_int(temp_real *, struct trapframe *, unsigned short);
+static void get_long_int(temp_real *, struct trapframe *, unsigned short);
+static void get_longlong_int(temp_real *, struct trapframe *, unsigned short);
+static void get_BCD(temp_real *, struct trapframe *, unsigned short);
+static void put_short_real(const temp_real *, struct trapframe *, unsigned short);
+static void put_long_real(const temp_real *, struct trapframe *, unsigned short);
+static void put_temp_real(const temp_real *, struct trapframe *, unsigned short);
+static void put_short_int(const temp_real *, struct trapframe *, unsigned short);
+static void put_long_int(const temp_real *, struct trapframe *, unsigned short);
+static void put_longlong_int(const temp_real *, struct trapframe *, unsigned short);
+static void put_BCD(const temp_real *, struct trapframe *, unsigned short);
/* add.c */
-void fadd(const temp_real *, const temp_real *, temp_real *);
+static void fadd(const temp_real *, const temp_real *, temp_real *);
/* mul.c */
-void fmul(const temp_real *, const temp_real *, temp_real *);
+static void fmul(const temp_real *, const temp_real *, temp_real *);
/* div.c */
-void fdiv(const temp_real *, const temp_real *, temp_real *);
+static void fdiv(const temp_real *, const temp_real *, temp_real *);
/* compare.c */
-void fcom(const temp_real *, const temp_real *);
-void fucom(const temp_real *, const temp_real *);
-void ftst(const temp_real *);
+static void fcom(const temp_real *, const temp_real *);
+static void fucom(const temp_real *, const temp_real *);
+static void ftst(const temp_real *);
#endif
diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c
index 392a189..f995d0c 100644
--- a/sys/i386/i386/math_emulate.c
+++ b/sys/i386/i386/math_emulate.c
@@ -6,7 +6,7 @@
* [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj]
*
* from: 386BSD 0.1
- * $Id: math_emulate.c,v 1.12 1995/05/30 07:59:35 rgrimes Exp $
+ * $Id: math_emulate.c,v 1.13 1995/06/14 05:06:51 bde Exp $
*/
/*
@@ -64,12 +64,29 @@ static void fpush(void);
static void fxchg(temp_real_unaligned * a, temp_real_unaligned * b);
static temp_real_unaligned * __st(int i);
-unsigned char get_fs_byte(char *adr) { return(fubyte(adr)); }
-unsigned short get_fs_word(unsigned short *adr) { return(fuword(adr)); }
-unsigned long get_fs_long(unsigned long *adr) { return(fuword(adr)); }
-void put_fs_byte(unsigned char val, char *adr) { (void)subyte(adr,val); }
-void put_fs_word(unsigned short val, short *adr) { (void)susword(adr,val); }
-void put_fs_long(u_long val, unsigned long *adr) { (void)suword(adr,val); }
+static unsigned char
+get_fs_byte(char *adr)
+ { return(fubyte(adr)); }
+
+static unsigned short
+get_fs_word(unsigned short *adr)
+ { return(fuword(adr)); }
+
+static unsigned long
+get_fs_long(unsigned long *adr)
+ { return(fuword(adr)); }
+
+static void
+put_fs_byte(unsigned char val, char *adr)
+ { (void)subyte(adr,val); }
+
+static void
+put_fs_word(unsigned short val, short *adr)
+ { (void)susword(adr,val); }
+
+static void
+put_fs_long(u_long val, unsigned long *adr)
+ { (void)suword(adr,val); }
int
math_emulate(struct trapframe * info)
@@ -528,7 +545,8 @@ for fcom , ??? ATS */
math_abort(info,SIGFPE);
}
-static void fpop(void)
+static void
+fpop(void)
{
unsigned long tmp;
@@ -538,7 +556,8 @@ static void fpop(void)
I387.swd |= tmp;
}
-static void fpush(void)
+static void
+fpush(void)
{
unsigned long tmp;
@@ -548,7 +567,8 @@ static void fpush(void)
I387.swd |= tmp;
}
-static void fxchg(temp_real_unaligned * a, temp_real_unaligned * b)
+static void
+fxchg(temp_real_unaligned * a, temp_real_unaligned * b)
{
temp_real_unaligned c;
@@ -557,7 +577,8 @@ static void fxchg(temp_real_unaligned * a, temp_real_unaligned * b)
*b = c;
}
-static temp_real_unaligned * __st(int i)
+static temp_real_unaligned *
+__st(int i)
{
i += I387.swd >> 11;
i &= 7;
@@ -581,7 +602,8 @@ static int __regoffset[] = {
#define REG(x) (curproc->p_md.md_regs[__regoffset[(x)]])
-static char * sib(struct trapframe * info, int mod)
+static char *
+sib(struct trapframe * info, int mod)
{
unsigned char ss,index,base;
long offset = 0;
@@ -610,7 +632,8 @@ static char * sib(struct trapframe * info, int mod)
return (char *) offset;
}
-char * ea(struct trapframe * info, unsigned short code)
+static char *
+ea(struct trapframe * info, unsigned short code)
{
unsigned char mod,rm;
long * tmp;
@@ -659,8 +682,8 @@ char * ea(struct trapframe * info, unsigned short code)
* other than temporary real format. All other cals are strictly temp_real.
*/
-void get_short_real(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_short_real(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
short_real sr;
@@ -670,8 +693,8 @@ void get_short_real(temp_real * tmp,
short_to_temp(&sr,tmp);
}
-void get_long_real(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_long_real(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
long_real lr;
@@ -682,8 +705,8 @@ void get_long_real(temp_real * tmp,
long_to_temp(&lr,tmp);
}
-void get_temp_real(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_temp_real(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
@@ -693,8 +716,8 @@ void get_temp_real(temp_real * tmp,
tmp->exponent = get_fs_word(4 + (unsigned short *) addr);
}
-void get_short_int(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_short_int(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
temp_int ti;
@@ -707,8 +730,8 @@ void get_short_int(temp_real * tmp,
int_to_real(&ti,tmp);
}
-void get_long_int(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_long_int(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
temp_int ti;
@@ -721,8 +744,8 @@ void get_long_int(temp_real * tmp,
int_to_real(&ti,tmp);
}
-void get_longlong_int(temp_real * tmp,
- struct trapframe * info, unsigned short code)
+static void
+get_longlong_int(temp_real * tmp, struct trapframe * info, unsigned short code)
{
char * addr;
temp_int ti;
@@ -751,7 +774,8 @@ __asm__("addl %0,%0 ; adcl %1,%1\n\t" \
__asm__("addl %4,%0 ; adcl $0,%1":"=r" (low),"=r" (high) \
:"0" (low),"1" (high),"r" ((unsigned long) (val)))
-void get_BCD(temp_real * tmp, struct trapframe * info, unsigned short code)
+static void
+get_BCD(temp_real * tmp, struct trapframe * info, unsigned short code)
{
int k;
char * addr;
@@ -772,7 +796,8 @@ void get_BCD(temp_real * tmp, struct trapframe * info, unsigned short code)
int_to_real(&i,tmp);
}
-void put_short_real(const temp_real * tmp,
+static void
+put_short_real(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -784,7 +809,8 @@ void put_short_real(const temp_real * tmp,
put_fs_long(sr,(unsigned long *) addr);
}
-void put_long_real(const temp_real * tmp,
+static void
+put_long_real(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -797,7 +823,8 @@ void put_long_real(const temp_real * tmp,
put_fs_long(lr.b, 1 + (unsigned long *) addr);
}
-void put_temp_real(const temp_real * tmp,
+static void
+put_temp_real(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -809,7 +836,8 @@ void put_temp_real(const temp_real * tmp,
put_fs_word(tmp->exponent, 4 + (short *) addr);
}
-void put_short_int(const temp_real * tmp,
+static void
+put_short_int(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -823,7 +851,8 @@ void put_short_int(const temp_real * tmp,
put_fs_word(ti.a,(short *) addr);
}
-void put_long_int(const temp_real * tmp,
+static void
+put_long_int(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -837,7 +866,8 @@ void put_long_int(const temp_real * tmp,
put_fs_long(ti.a,(unsigned long *) addr);
}
-void put_longlong_int(const temp_real * tmp,
+static void
+put_longlong_int(const temp_real * tmp,
struct trapframe * info, unsigned short code)
{
char * addr;
@@ -860,7 +890,8 @@ __asm__("divl %6 ; xchgl %1,%2 ; divl %6" \
:"=d" (rem),"=a" (low),"=r" (high) \
:"0" (0),"1" (high),"2" (low),"c" (10))
-void put_BCD(const temp_real * tmp,struct trapframe * info, unsigned short code)
+static void
+put_BCD(const temp_real * tmp,struct trapframe * info, unsigned short code)
{
int k,rem;
char * addr;
@@ -894,7 +925,8 @@ void put_BCD(const temp_real * tmp,struct trapframe * info, unsigned short code)
*/
-static void shift(int * c)
+static void
+shift(int * c)
{
__asm__("movl (%0),%%eax ; addl %%eax,(%0)\n\t"
"movl 4(%0),%%eax ; adcl %%eax,4(%0)\n\t"
@@ -903,7 +935,8 @@ static void shift(int * c)
::"r" ((long) c):"ax");
}
-static void mul64(const temp_real * a, const temp_real * b, int * c)
+static void
+mul64(const temp_real * a, const temp_real * b, int * c)
{
__asm__("movl (%0),%%eax\n\t"
"mull (%1)\n\t"
@@ -927,7 +960,8 @@ static void mul64(const temp_real * a, const temp_real * b, int * c)
:"ax","dx");
}
-void fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
+static void
+fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
{
int i,sign;
int tmp[4] = {0,0,0,0};
@@ -966,7 +1000,8 @@ void fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
* temporary real division routine.
*/
-static void shift_left(int * c)
+static void
+shift_left(int * c)
{
__asm__ __volatile__("movl (%0),%%eax ; addl %%eax,(%0)\n\t"
"movl 4(%0),%%eax ; adcl %%eax,4(%0)\n\t"
@@ -975,13 +1010,15 @@ static void shift_left(int * c)
::"r" ((long) c):"ax");
}
-static void shift_right(int * c)
+static void
+shift_right(int * c)
{
__asm__("shrl $1,12(%0) ; rcrl $1,8(%0) ; rcrl $1,4(%0) ; rcrl $1,(%0)"
::"r" ((long) c));
}
-static int try_sub(int * a, int * b)
+static int
+try_sub(int * a, int * b)
{
char ok;
@@ -993,7 +1030,8 @@ static int try_sub(int * a, int * b)
return ok;
}
-static void div64(int * a, int * b, int * c)
+static void
+div64(int * a, int * b, int * c)
{
int tmp[4];
int i;
@@ -1016,7 +1054,8 @@ static void div64(int * a, int * b, int * c)
}
}
-void fdiv(const temp_real * src1, const temp_real * src2, temp_real * result)
+static void
+fdiv(const temp_real * src1, const temp_real * src2, temp_real * result)
{
int i,sign;
int a[4],b[4],tmp[4] = {0,0,0,0};
@@ -1118,7 +1157,8 @@ static void unsignify(temp_real * a)
}
}
-void fadd(const temp_real * src1, const temp_real * src2, temp_real * result)
+static void
+fadd(const temp_real * src1, const temp_real * src2, temp_real * result)
{
temp_real a,b;
int x1,x2,shift;
@@ -1168,7 +1208,8 @@ void fadd(const temp_real * src1, const temp_real * src2, temp_real * result)
#define clear_Cx() (I387.swd &= ~0x4500)
-static void normalize(temp_real * a)
+static void
+normalize(temp_real * a)
{
int i = a->exponent & 0x7fff;
int sign = a->exponent & 0x8000;
@@ -1186,7 +1227,8 @@ static void normalize(temp_real * a)
a->exponent = i | sign;
}
-void ftst(const temp_real * a)
+static void
+ftst(const temp_real * a)
{
temp_real b;
@@ -1200,7 +1242,8 @@ void ftst(const temp_real * a)
set_C3();
}
-void fcom(const temp_real * src1, const temp_real * src2)
+static void
+fcom(const temp_real * src1, const temp_real * src2)
{
temp_real a;
@@ -1210,7 +1253,8 @@ void fcom(const temp_real * src1, const temp_real * src2)
ftst(&a);
}
-void fucom(const temp_real * src1, const temp_real * src2)
+static void
+fucom(const temp_real * src1, const temp_real * src2)
{
fcom(src1,src2);
}
@@ -1234,7 +1278,8 @@ void fucom(const temp_real * src1, const temp_real * src2)
* if the temp-real number simply won't fit in a short- or long-real.)
*/
-void short_to_temp(const short_real * a, temp_real * b)
+static void
+short_to_temp(const short_real * a, temp_real * b)
{
if (!(*a & 0x7fffffff)) {
b->a = b->b = 0;
@@ -1251,7 +1296,8 @@ void short_to_temp(const short_real * a, temp_real * b)
b->a = 0;
}
-void long_to_temp(const long_real * a, temp_real * b)
+static void
+long_to_temp(const long_real * a, temp_real * b)
{
if (!a->a && !(a->b & 0x7fffffff)) {
b->a = b->b = 0;
@@ -1268,7 +1314,8 @@ void long_to_temp(const long_real * a, temp_real * b)
b->a = a->a<<11;
}
-void temp_to_short(const temp_real * a, short_real * b)
+static void
+temp_to_short(const temp_real * a, short_real * b)
{
if (!(a->exponent & 0x7fff)) {
*b = (a->exponent)?0x80000000UL:0;
@@ -1294,7 +1341,8 @@ void temp_to_short(const temp_real * a, short_real * b)
}
}
-void temp_to_long(const temp_real * a, long_real * b)
+static void
+temp_to_long(const temp_real * a, long_real * b)
{
if (!(a->exponent & 0x7fff)) {
b->a = 0;
@@ -1329,7 +1377,8 @@ void temp_to_long(const temp_real * a, long_real * b)
}
}
-void frndint(const temp_real * a, temp_real * b)
+static void
+frndint(const temp_real * a, temp_real * b)
{
int shift = 16383 + 63 - (a->exponent & 0x7fff);
unsigned long underflow;
@@ -1396,7 +1445,8 @@ void frndint(const temp_real * a, temp_real * b)
b->exponent = 0;
}
-void Fscale(const temp_real *a, const temp_real *b, temp_real *c)
+static void
+Fscale(const temp_real *a, const temp_real *b, temp_real *c)
{
temp_int ti;
@@ -1412,7 +1462,8 @@ void Fscale(const temp_real *a, const temp_real *b, temp_real *c)
c->exponent += ti.a;
}
-void real_to_int(const temp_real * a, temp_int * b)
+static void
+real_to_int(const temp_real * a, temp_int * b)
{
int shift = 16383 + 63 - (a->exponent & 0x7fff);
unsigned long underflow;
@@ -1467,7 +1518,8 @@ void real_to_int(const temp_real * a, temp_int * b)
}
}
-void int_to_real(const temp_int * a, temp_real * b)
+static void
+int_to_real(const temp_int * a, temp_real * b)
{
b->a = a->a;
b->b = a->b;
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index c6c2b42..f7b6042 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)kern_acct.c 8.1 (Berkeley) 6/14/93
- * $Id: kern_acct.c,v 1.6 1994/10/02 17:35:09 phk Exp $
+ * $Id: kern_acct.c,v 1.7 1995/07/23 23:02:20 mpp Exp $
*/
#include <sys/param.h>
@@ -161,7 +161,7 @@ acct_process(p)
struct acct acct;
struct rusage *r;
struct timeval ut, st, tmp;
- int s, t;
+ int t;
struct vnode *vp;
/* If accounting isn't enabled, don't bother */
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 0e4145a..a2e2d47 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)subr_log.c 8.1 (Berkeley) 6/10/93
- * $Id: subr_log.c,v 1.8 1995/05/30 08:05:52 rgrimes Exp $
+ * $Id: subr_log.c,v 1.9 1995/08/07 07:58:17 davidg Exp $
*/
/*
@@ -67,8 +67,6 @@ logopen(dev, flags, mode, p)
int flags, mode;
struct proc *p;
{
- register struct msgbuf *mbp = msgbufp;
-
if (log_open)
return (EBUSY);
log_open = 1;
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c
index abfc765..77c1596 100644
--- a/sys/kern/tty_snoop.c
+++ b/sys/kern/tty_snoop.c
@@ -182,7 +182,6 @@ snpin(snp, buf, n)
int s, len, nblen;
caddr_t from, to;
char *nbuf;
- struct tty *tp;
if (n == 0)
@@ -471,7 +470,7 @@ snpselect(dev, rw, p)
int rw;
struct proc *p;
{
- int unit = minor(dev), s;
+ int unit = minor(dev);
struct snoop *snp = &snoopsw[unit];
if (rw != FREAD)
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index a0ed0ed..d180cac 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
- * $Id: uipc_mbuf.c,v 1.11 1995/08/28 09:18:52 julian Exp $
+ * $Id: uipc_mbuf.c,v 1.12 1995/09/09 18:10:12 davidg Exp $
*/
#include <sys/param.h>
@@ -97,7 +97,6 @@ m_clalloc(ncl, nowait)
register int ncl;
int nowait;
{
- static int logged;
register caddr_t p;
register int i;
int npg;
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index d9c644c..1e45a1e 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.66 1995/10/08 00:06:08 swallace Exp $
+ * $Id: vfs_bio.c,v 1.67 1995/10/19 23:48:25 dyson Exp $
*/
/*
@@ -640,7 +640,6 @@ getnewbuf(int slpflag, int slptimeo, int doingvmio)
{
struct buf *bp;
int s;
- int firstbp = 1;
s = splbio();
start:
@@ -789,7 +788,6 @@ inmem(struct vnode * vp, daddr_t blkno)
off = blkno * vp->v_mount->mnt_stat.f_iosize;
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
- int mask;
m = vm_page_lookup(obj, trunc_page(toff + off));
if (!m)
@@ -869,8 +867,6 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
struct buf *bp;
int s;
struct bufhashhdr *bh;
- vm_offset_t off;
- int nleft;
s = splbio();
loop:
@@ -1092,13 +1088,11 @@ allocbuf(struct buf * bp, int size)
curbpnpages = bp->b_npages;
bp->b_flags |= B_CACHE;
for (toff = 0; toff < newbsize; toff += tinc) {
- int mask;
int bytesinpage;
pageindex = toff / PAGE_SIZE;
objoff = trunc_page(toff + off);
if (pageindex < curbpnpages) {
- int pb;
m = bp->b_pages[pageindex];
if (m->offset != objoff)
@@ -1145,7 +1139,6 @@ allocbuf(struct buf * bp, int size)
goto doretry;
} else {
- int pb;
if ((curproc != pageproc) &&
(m->flags & PG_CACHE) &&
(cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
@@ -1229,7 +1222,6 @@ biodone(register struct buf * bp)
bp->b_flags |= B_DONE;
if ((bp->b_flags & B_READ) == 0) {
- struct vnode *vp = bp->b_vp;
vwakeup(bp);
}
#ifdef BOUNCE_BUFFERS
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 7b0fc56..7813a9a 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_cache.c 8.3 (Berkeley) 8/22/94
- * $Id: vfs_cache.c,v 1.15 1995/05/30 08:06:28 rgrimes Exp $
+ * $Id: vfs_cache.c,v 1.16 1995/07/29 11:40:19 bde Exp $
*/
#include <sys/param.h>
@@ -296,7 +296,7 @@ cache_purgevfs(mp)
struct mount *mp;
{
struct nchashhead *ncpp;
- struct namecache *ncp, *nxtcp;
+ struct namecache *ncp;
/* Scan hash tables for applicable entries */
for (ncpp = &nchashtbl[nchash - 1]; ncpp >= nchashtbl; ncpp--) {
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index bfc1671..8644b7f 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
- * $Id: vfs_cluster.c,v 1.21 1995/09/23 21:12:45 dyson Exp $
+ * $Id: vfs_cluster.c,v 1.22 1995/10/09 03:19:49 dyson Exp $
*/
#include <sys/param.h>
@@ -122,7 +122,6 @@ cluster_read(vp, filesize, lblkno, size, cred, bpp)
{
struct buf *bp, *rbp;
daddr_t blkno, rablkno, origlblkno;
- long flags;
int error, num_ra, alreadyincore;
int i;
int seq;
@@ -192,7 +191,6 @@ cluster_read(vp, filesize, lblkno, size, cred, bpp)
alreadyincore = (int) incore(vp, rablkno);
if (!alreadyincore) {
if (inmem(vp, rablkno)) {
- struct buf *bpt;
if (vp->v_maxra < rablkno)
vp->v_maxra = rablkno + 1;
continue;
@@ -402,7 +400,6 @@ cluster_callback(bp)
{
struct cluster_save *b_save;
struct buf **bpp, *tbp;
- caddr_t cp;
int error = 0;
/*
@@ -566,7 +563,6 @@ cluster_wbuild(vp, last_bp, size, start_lbn, len, lbn)
{
struct cluster_save *b_save;
struct buf *bp, *tbp, *pb;
- caddr_t cp;
int i, j, s;
#ifdef DIAGNOSTIC
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index b5718f6..ba2a229 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.8 1995/08/30 00:17:18 bde Exp $
+ * $Id: vfs_conf.c,v 1.9 1995/09/09 18:10:15 davidg Exp $
*/
/*
@@ -104,7 +104,6 @@ vfs_mountroot(data)
u_int size;
int err = 0;
struct proc *p = curproc; /* XXX */
- register struct fs *fs;
struct vfsops *mnt_op = (struct vfsops *)data;
/*
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index b5718f6..ba2a229 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.8 1995/08/30 00:17:18 bde Exp $
+ * $Id: vfs_conf.c,v 1.9 1995/09/09 18:10:15 davidg Exp $
*/
/*
@@ -104,7 +104,6 @@ vfs_mountroot(data)
u_int size;
int err = 0;
struct proc *p = curproc; /* XXX */
- register struct fs *fs;
struct vfsops *mnt_op = (struct vfsops *)data;
/*
diff --git a/sys/kern/vnode_if.pl b/sys/kern/vnode_if.pl
index b89ca15..6994f22 100644
--- a/sys/kern/vnode_if.pl
+++ b/sys/kern/vnode_if.pl
@@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
-# $Id: vnode_if.sh,v 1.5 1995/09/04 00:20:18 dyson Exp $
+# $Id: vnode_if.sh,v 1.6 1995/09/11 16:05:16 bde Exp $
#
# Script to produce VFS front-end sugar.
@@ -275,7 +275,7 @@ $AWK 'function kill_surrounding_ws (s) {
}
function generate_operation_vp_offsets() {
- printf ("int %s_vp_offsets[] = {\n", name);
+ printf ("static int %s_vp_offsets[] = {\n", name);
# as a side effect, figure out the releflags
releflags = "";
vpnum = 0;
diff --git a/sys/kern/vnode_if.sh b/sys/kern/vnode_if.sh
index b89ca15..6994f22 100644
--- a/sys/kern/vnode_if.sh
+++ b/sys/kern/vnode_if.sh
@@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
-# $Id: vnode_if.sh,v 1.5 1995/09/04 00:20:18 dyson Exp $
+# $Id: vnode_if.sh,v 1.6 1995/09/11 16:05:16 bde Exp $
#
# Script to produce VFS front-end sugar.
@@ -275,7 +275,7 @@ $AWK 'function kill_surrounding_ws (s) {
}
function generate_operation_vp_offsets() {
- printf ("int %s_vp_offsets[] = {\n", name);
+ printf ("static int %s_vp_offsets[] = {\n", name);
# as a side effect, figure out the releflags
releflags = "";
vpnum = 0;
diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c
index f959d15..1a7c07f 100644
--- a/sys/miscfs/kernfs/kernfs_vnops.c
+++ b/sys/miscfs/kernfs/kernfs_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kernfs_vnops.c 8.6 (Berkeley) 2/10/94
- * $Id: kernfs_vnops.c,v 1.9 1995/07/31 08:52:02 mpp Exp $
+ * $Id: kernfs_vnops.c,v 1.10 1995/07/31 09:52:21 mpp Exp $
*/
/*
@@ -65,7 +65,7 @@
#define WRITE_MODE (S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH)
#define DIR_MODE (S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
-struct kern_target {
+static struct kern_target {
char *kt_name;
void *kt_data;
#define KTT_NULL 1
@@ -203,7 +203,7 @@ kernfs_xwrite(kt, buf, len)
* vp is the current namei directory
* ndp is the name to locate in that directory...
*/
-int
+static int
kernfs_lookup(ap)
struct vop_lookup_args /* {
struct vnode * a_dvp;
@@ -325,7 +325,7 @@ bad:;
return (error);
}
-int
+static int
kernfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -389,7 +389,7 @@ kernfs_access(ap)
}
-int
+static int
kernfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -453,7 +453,7 @@ kernfs_getattr(ap)
return (error);
}
-int
+static int
kernfs_setattr(ap)
struct vop_setattr_args /* {
struct vnode *a_vp;
@@ -544,7 +544,7 @@ kernfs_write(ap)
}
-int
+static int
kernfs_readdir(ap)
struct vop_readdir_args /* {
struct vnode *a_vp;
@@ -595,7 +595,7 @@ kernfs_readdir(ap)
return (error);
}
-int
+static int
kernfs_inactive(ap)
struct vop_inactive_args /* {
struct vnode *a_vp;
@@ -614,7 +614,7 @@ kernfs_inactive(ap)
return (0);
}
-int
+static int
kernfs_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
@@ -634,7 +634,7 @@ kernfs_reclaim(ap)
/*
* Return POSIX pathconf information applicable to special devices.
*/
-int
+static int
kernfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
@@ -672,7 +672,7 @@ kernfs_pathconf(ap)
* Print out the contents of a kernfs vnode.
*/
/* ARGSUSED */
-int
+static int
kernfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@@ -684,7 +684,7 @@ kernfs_print(ap)
}
/*void*/
-int
+static int
kernfs_vfree(ap)
struct vop_vfree_args /* {
struct vnode *a_pvp;
@@ -699,7 +699,7 @@ kernfs_vfree(ap)
/*
* Kernfs vnode unsupported operation
*/
-int
+static int
kernfs_enotsupp()
{
@@ -709,22 +709,12 @@ kernfs_enotsupp()
/*
* Kernfs "should never get here" operation
*/
-int
+static int
kernfs_badop()
{
return (EIO);
}
-/*
- * kernfs vnode null operation
- */
-int
-kernfs_nullop()
-{
-
- return (0);
-}
-
#define kernfs_create ((int (*) __P((struct vop_create_args *)))kernfs_enotsupp)
#define kernfs_mknod ((int (*) __P((struct vop_mknod_args *)))kernfs_enotsupp)
#define kernfs_close ((int (*) __P((struct vop_close_args *)))nullop)
@@ -761,7 +751,7 @@ kernfs_nullop()
#define kernfs_bwrite ((int (*) __P((struct vop_bwrite_args *)))kernfs_enotsupp)
int (**kernfs_vnodeop_p)();
-struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, kernfs_lookup }, /* lookup */
{ &vop_create_desc, kernfs_create }, /* create */
@@ -805,7 +795,7 @@ struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, kernfs_bwrite }, /* bwrite */
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc kernfs_vnodeop_opv_desc =
+static struct vnodeopv_desc kernfs_vnodeop_opv_desc =
{ &kernfs_vnodeop_p, kernfs_vnodeop_entries };
VNODEOP_SET(kernfs_vnodeop_opv_desc);
diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h
index 804d4f6..b9ea01c 100644
--- a/sys/msdosfs/denode.h
+++ b/sys/msdosfs/denode.h
@@ -1,4 +1,4 @@
-/* $Id: denode.h,v 1.5 1995/05/30 08:07:32 rgrimes Exp $ */
+/* $Id: denode.h,v 1.6 1995/08/02 12:59:47 dfr Exp $ */
/* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */
/*-
@@ -227,45 +227,9 @@ struct defid {
};
extern int (**msdosfs_vnodeop_p)();
-
-/*
- * Prototypes for MSDOSFS vnode operations
- */
int msdosfs_lookup __P((struct vop_lookup_args *));
-int msdosfs_create __P((struct vop_create_args *));
-int msdosfs_mknod __P((struct vop_mknod_args *));
-int msdosfs_open __P((struct vop_open_args *));
-int msdosfs_close __P((struct vop_close_args *));
-int msdosfs_access __P((struct vop_access_args *));
-int msdosfs_getattr __P((struct vop_getattr_args *));
-int msdosfs_setattr __P((struct vop_setattr_args *));
-int msdosfs_read __P((struct vop_read_args *));
-int msdosfs_write __P((struct vop_write_args *));
-int msdosfs_ioctl __P((struct vop_ioctl_args *));
-int msdosfs_select __P((struct vop_select_args *));
-int msdosfs_mmap __P((struct vop_mmap_args *));
-int msdosfs_fsync __P((struct vop_fsync_args *));
-int msdosfs_seek __P((struct vop_seek_args *));
-int msdosfs_remove __P((struct vop_remove_args *));
-int msdosfs_link __P((struct vop_link_args *));
-int msdosfs_rename __P((struct vop_rename_args *));
-int msdosfs_mkdir __P((struct vop_mkdir_args *));
-int msdosfs_rmdir __P((struct vop_rmdir_args *));
-int msdosfs_symlink __P((struct vop_symlink_args *));
-int msdosfs_readdir __P((struct vop_readdir_args *));
-int msdosfs_readlink __P((struct vop_readlink_args *));
-int msdosfs_abortop __P((struct vop_abortop_args *));
int msdosfs_inactive __P((struct vop_inactive_args *));
int msdosfs_reclaim __P((struct vop_reclaim_args *));
-int msdosfs_lock __P((struct vop_lock_args *));
-int msdosfs_unlock __P((struct vop_unlock_args *));
-int msdosfs_bmap __P((struct vop_bmap_args *));
-int msdosfs_strategy __P((struct vop_strategy_args *));
-int msdosfs_print __P((struct vop_print_args *));
-int msdosfs_islocked __P((struct vop_islocked_args *));
-int msdosfs_advlock __P((struct vop_advlock_args *));
-int msdosfs_reallocblks __P((struct vop_reallocblks_args *));
-
/*
* Internal service routine prototypes.
*/
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c
index 8899982..827d651 100644
--- a/sys/msdosfs/msdosfs_conv.c
+++ b/sys/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_conv.c,v 1.4 1995/03/29 18:48:06 ache Exp $ */
+/* $Id: msdosfs_conv.c,v 1.5 1995/05/30 08:07:36 rgrimes Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
/*
@@ -141,8 +141,8 @@ dos2unixtime(dd, dt, tsp)
struct timespec *tsp;
{
u_long seconds;
- u_long m, month;
- u_long y, year;
+ u_long month;
+ u_long year;
u_long days;
u_short *months;
diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c
index b43f959..10f397a 100644
--- a/sys/msdosfs/msdosfs_fat.c
+++ b/sys/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_fat.c,v 1.6 1995/04/11 16:43:20 bde Exp $ */
+/* $Id: msdosfs_fat.c,v 1.7 1995/05/30 08:07:40 rgrimes Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
/*-
@@ -300,7 +300,7 @@ void fc_purge(dep, frcn)
* bp - addr of modified fat block
* fatbn - block number relative to begin of filesystem of the modified fat block.
*/
-void
+static void
updatefats(pmp, bp, fatbn)
struct msdosfsmount *pmp;
struct buf *bp;
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 3521f3c..b501a5d 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_vnops.c,v 1.24 1995/10/07 10:14:12 bde Exp $ */
+/* $Id: msdosfs_vnops.c,v 1.25 1995/10/22 09:32:37 davidg Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@@ -71,6 +71,42 @@
#include <msdosfs/denode.h>
#include <msdosfs/msdosfsmount.h>
#include <msdosfs/fat.h>
+
+/*
+ * Prototypes for MSDOSFS vnode operations
+ */
+static int msdosfs_create __P((struct vop_create_args *));
+static int msdosfs_mknod __P((struct vop_mknod_args *));
+static int msdosfs_open __P((struct vop_open_args *));
+static int msdosfs_close __P((struct vop_close_args *));
+static int msdosfs_access __P((struct vop_access_args *));
+static int msdosfs_getattr __P((struct vop_getattr_args *));
+static int msdosfs_setattr __P((struct vop_setattr_args *));
+static int msdosfs_read __P((struct vop_read_args *));
+static int msdosfs_write __P((struct vop_write_args *));
+static int msdosfs_ioctl __P((struct vop_ioctl_args *));
+static int msdosfs_select __P((struct vop_select_args *));
+static int msdosfs_mmap __P((struct vop_mmap_args *));
+static int msdosfs_fsync __P((struct vop_fsync_args *));
+static int msdosfs_seek __P((struct vop_seek_args *));
+static int msdosfs_remove __P((struct vop_remove_args *));
+static int msdosfs_link __P((struct vop_link_args *));
+static int msdosfs_rename __P((struct vop_rename_args *));
+static int msdosfs_mkdir __P((struct vop_mkdir_args *));
+static int msdosfs_rmdir __P((struct vop_rmdir_args *));
+static int msdosfs_symlink __P((struct vop_symlink_args *));
+static int msdosfs_readdir __P((struct vop_readdir_args *));
+static int msdosfs_readlink __P((struct vop_readlink_args *));
+static int msdosfs_abortop __P((struct vop_abortop_args *));
+static int msdosfs_lock __P((struct vop_lock_args *));
+static int msdosfs_unlock __P((struct vop_unlock_args *));
+static int msdosfs_bmap __P((struct vop_bmap_args *));
+static int msdosfs_strategy __P((struct vop_strategy_args *));
+static int msdosfs_print __P((struct vop_print_args *));
+static int msdosfs_islocked __P((struct vop_islocked_args *));
+static int msdosfs_advlock __P((struct vop_advlock_args *));
+static int msdosfs_reallocblks __P((struct vop_reallocblks_args *));
+
/*
* Some general notes:
*
@@ -95,7 +131,7 @@
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or
* only if the SAVESTART bit in cn_flags is clear on success.
*/
-int
+static int
msdosfs_create(ap)
struct vop_create_args /* {
struct vnode *a_dvp;
@@ -146,7 +182,7 @@ msdosfs_create(ap)
return error;
}
-int
+static int
msdosfs_mknod(ap)
struct vop_mknod_args /* {
struct vnode *a_dvp;
@@ -175,7 +211,7 @@ msdosfs_mknod(ap)
return error;
}
-int
+static int
msdosfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -187,7 +223,7 @@ msdosfs_open(ap)
return 0;
}
-int
+static int
msdosfs_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -204,7 +240,7 @@ msdosfs_close(ap)
return 0;
}
-int
+static int
msdosfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -280,7 +316,7 @@ msdosfs_access(ap)
return (file_mode & mask) == mask ? 0 : EACCES;
}
-int
+static int
msdosfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -338,7 +374,7 @@ msdosfs_getattr(ap)
return 0;
}
-int
+static int
msdosfs_setattr(ap)
struct vop_setattr_args /* {
struct vnode *a_vp;
@@ -462,7 +498,7 @@ msdosfs_setattr(ap)
return error;
}
-int
+static int
msdosfs_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -555,7 +591,7 @@ msdosfs_read(ap)
/*
* Write data to a file or directory.
*/
-int
+static int
msdosfs_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -769,7 +805,7 @@ errexit:
return error;
}
-int
+static int
msdosfs_ioctl(ap)
struct vop_ioctl_args /* {
struct vnode *a_vp;
@@ -783,7 +819,7 @@ msdosfs_ioctl(ap)
return ENOTTY;
}
-int
+static int
msdosfs_select(ap)
struct vop_select_args /* {
struct vnode *a_vp;
@@ -796,7 +832,7 @@ msdosfs_select(ap)
return 1; /* DOS filesystems never block? */
}
-int
+static int
msdosfs_mmap(ap)
struct vop_mmap_args /* {
struct vnode *a_vp;
@@ -814,7 +850,7 @@ msdosfs_mmap(ap)
* This function is worthless for vnodes that represent directories. Maybe we
* could just do a sync if they try an fsync on a directory file.
*/
-int
+static int
msdosfs_fsync(ap)
struct vop_fsync_args /* {
struct vnode *a_vp;
@@ -866,7 +902,7 @@ loop:
* Now the whole work of extending a file is done in the write function.
* So nothing to do here.
*/
-int
+static int
msdosfs_seek(ap)
struct vop_seek_args /* {
struct vnode *a_vp;
@@ -878,7 +914,7 @@ msdosfs_seek(ap)
return 0;
}
-int
+static int
msdosfs_remove(ap)
struct vop_remove_args /* {
struct vnode *a_dvp;
@@ -908,7 +944,7 @@ msdosfs_remove(ap)
* msdosfs_lookup() with create and lockparent, the parent is locked so we
* have to free it before we return the error.
*/
-int
+static int
msdosfs_link(ap)
struct vop_link_args /* {
struct vnode *a_tdvp;
@@ -972,7 +1008,7 @@ msdosfs_link(ap)
* componentname structures is freed, there may be some memory bleeding
* for each rename done.
*/
-int
+static int
msdosfs_rename(ap)
struct vop_rename_args /* {
struct vnode *a_fdvp;
@@ -1227,7 +1263,7 @@ bad: ;
return error;
}
-struct {
+static struct {
struct direntry dot;
struct direntry dotdot;
} dosdirtemplate = {
@@ -1248,7 +1284,7 @@ struct {
}
};
-int
+static int
msdosfs_mkdir(ap)
struct vop_mkdir_args /* {
struct vnode *a_dvp;
@@ -1350,7 +1386,7 @@ msdosfs_mkdir(ap)
return error;
}
-int
+static int
msdosfs_rmdir(ap)
struct vop_rmdir_args /* {
struct vnode *a_dvp;
@@ -1419,7 +1455,7 @@ out: ;
/*
* DOS filesystems don't know what symlinks are.
*/
-int
+static int
msdosfs_symlink(ap)
struct vop_symlink_args /* {
struct vnode *a_dvp;
@@ -1439,7 +1475,7 @@ msdosfs_symlink(ap)
* in a dos filesystem. Dos doesn't provide these. Note that each entry
* must be the same size as a dos directory entry (32 bytes).
*/
-struct dos_dirent {
+static struct dos_dirent {
u_long d_fileno;
u_short d_reclen;
u_char d_type;
@@ -1463,7 +1499,7 @@ struct dos_dirent {
}
};
-int
+static int
msdosfs_readdir(ap)
struct vop_readdir_args /* {
struct vnode *a_vp;
@@ -1737,7 +1773,7 @@ out: ;
/*
* DOS filesystems don't know what symlinks are.
*/
-int
+static int
msdosfs_readlink(ap)
struct vop_readlink_args /* {
struct vnode *a_vp;
@@ -1748,7 +1784,7 @@ msdosfs_readlink(ap)
return EINVAL;
}
-int
+static int
msdosfs_abortop(ap)
struct vop_abortop_args /* {
struct vnode *a_dvp;
@@ -1760,7 +1796,7 @@ msdosfs_abortop(ap)
return 0;
}
-int
+static int
msdosfs_lock(ap)
struct vop_lock_args /* {
struct vnode *a_vp;
@@ -1781,7 +1817,7 @@ msdosfs_lock(ap)
return 0;
}
-int
+static int
msdosfs_unlock(ap)
struct vop_unlock_args /* {
struct vnode *vp;
@@ -1800,7 +1836,7 @@ msdosfs_unlock(ap)
return 0;
}
-int
+static int
msdosfs_islocked(ap)
struct vop_islocked_args /* {
struct vnode *a_vp;
@@ -1816,7 +1852,7 @@ msdosfs_islocked(ap)
* containing the file of interest
* bnp - address of where to return the filesystem relative block number
*/
-int
+static int
msdosfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -1845,7 +1881,8 @@ msdosfs_bmap(ap)
return pcbmap(dep, ap->a_bn, ap->a_bnp, 0);
}
-int msdosfs_reallocblks(ap)
+static int
+msdosfs_reallocblks(ap)
struct vop_reallocblks_args /* {
struct vnode *a_vp;
struct cluster_save *a_buflist;
@@ -1855,7 +1892,7 @@ int msdosfs_reallocblks(ap)
return ENOSPC;
}
-int
+static int
msdosfs_strategy(ap)
struct vop_strategy_args /* {
struct buf *a_bp;
@@ -1897,7 +1934,7 @@ msdosfs_strategy(ap)
return 0;
}
-int
+static int
msdosfs_print(ap)
struct vop_print_args /* {
struct vnode *vp;
@@ -1920,7 +1957,7 @@ msdosfs_print(ap)
return 0;
}
-int
+static int
msdosfs_advlock(ap)
struct vop_advlock_args /* {
struct vnode *a_vp;
@@ -1933,7 +1970,7 @@ msdosfs_advlock(ap)
return EINVAL; /* we don't do locking yet */
}
-int
+static int
msdosfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
@@ -1964,7 +2001,7 @@ msdosfs_pathconf(ap)
/* Global vfs data structures for msdosfs */
int (**msdosfs_vnodeop_p)();
-struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, msdosfs_lookup }, /* lookup */
{ &vop_create_desc, msdosfs_create }, /* create */
@@ -2004,7 +2041,7 @@ struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc *)NULL, (int (*)())NULL }
};
-struct vnodeopv_desc msdosfs_vnodeop_opv_desc =
+static struct vnodeopv_desc msdosfs_vnodeop_opv_desc =
{ &msdosfs_vnodeop_p, msdosfs_vnodeop_entries };
VNODEOP_SET(msdosfs_vnodeop_opv_desc);
diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c
index 76fb9ec..b3af66e 100644
--- a/sys/net/if_disc.c
+++ b/sys/net/if_disc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_disc.c,v 1.6 1995/09/09 18:10:21 davidg Exp $
+ * $Id: if_disc.c,v 1.7 1995/09/22 17:57:47 wollman Exp $
*/
/*
@@ -116,9 +116,6 @@ dsoutput(ifp, m, dst, rt)
struct sockaddr *dst;
register struct rtentry *rt;
{
- int s, isr;
- register struct ifqueue *ifq = 0;
-
if ((m->m_flags & M_PKTHDR) == 0)
panic("dsoutput no HDR");
ifp->if_lastchange = time;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 9da90b1..086626c 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ethersubr.c,v 1.9 1995/06/11 19:31:39 rgrimes Exp $
+ * $Id: if_ethersubr.c,v 1.10 1995/10/26 20:30:09 julian Exp $
*/
#include <sys/param.h>
@@ -327,7 +327,6 @@ ether_input(ifp, eh, m)
{
register struct ifqueue *inq;
register struct llc *l;
- struct arpcom *ac = (struct arpcom *)ifp;
u_short ether_type;
int s;
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index dab6370..1962ed6 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.22 1995/10/05 00:33:27 bde Exp $ */
+/* $Id: if_ppp.c,v 1.23 1995/10/26 20:30:15 julian Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
#include "ppp.h"
@@ -294,7 +294,7 @@ pppopen(dev, tp)
{
struct proc *p = curproc; /* XXX */
register struct ppp_softc *sc;
- int error, s, i;
+ int error;
if (error = suser(p->p_ucred, &p->p_acflag))
return (error);
@@ -352,7 +352,6 @@ pppclose(tp, flag)
int flag;
{
register struct ppp_softc *sc;
- struct mbuf *m;
int s;
ttyflush(tp, FREAD | FWRITE);
@@ -901,7 +900,7 @@ pppstart(tp)
register struct mbuf *m;
register int len;
register u_char *start, *stop, *cp;
- int n, s, ndone, done;
+ int n, ndone, done;
struct mbuf *m2;
if ((tp->t_state & TS_CONNECTED) == 0) {
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 3e3d442..b233039 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -96,7 +96,6 @@ tunattach(udata)
{
register int i;
struct ifnet *ifp;
- struct sockaddr_in *sin;
/*
* In case we are an LKM, set up device switch.
@@ -239,7 +238,6 @@ tunifioctl(ifp, cmd, data)
caddr_t data;
{
register struct ifreq *ifr = (struct ifreq *)data;
- struct tun_softc *tp = &tunctl[ifp->if_unit];
int error = 0, s;
s = splimp();
diff --git a/sys/net/route.c b/sys/net/route.c
index e5bae41..eb50c28 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id: route.c,v 1.25 1995/07/29 11:41:02 bde Exp $
+ * $Id: route.c,v 1.26 1995/10/16 19:09:40 wollman Exp $
*/
#include <sys/param.h>
@@ -373,7 +373,6 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
register struct radix_node_head *rnh;
struct ifaddr *ifa;
struct sockaddr *ndst;
- u_long prflags = 0UL;
#define senderr(x) { error = x ; goto bad; }
if ((rnh = rt_tables[dst->sa_family]) == 0)
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index d129182..f2ee490 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.c 8.4 (Berkeley) 1/9/95
- * $Id: in.c,v 1.15 1995/07/17 15:15:15 wollman Exp $
+ * $Id: in.c,v 1.16 1995/09/21 17:50:43 wollman Exp $
*/
#include <sys/param.h>
@@ -691,7 +691,6 @@ void
in_delmulti(inm)
register struct in_multi *inm;
{
- register struct in_multi **p;
struct ifreq ifr;
int s = splnet();
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 834f13a..6162d84 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id: in_pcb.c,v 1.12 1995/05/30 08:09:28 rgrimes Exp $
+ * $Id: in_pcb.c,v 1.13 1995/09/21 17:55:49 wollman Exp $
*/
#include <sys/param.h>
@@ -178,7 +178,6 @@ in_pcbladdr(inp, nam, plocal_sin)
struct sockaddr_in **plocal_sin;
{
struct in_ifaddr *ia;
- struct sockaddr_in *ifaddr = 0;
register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
if (nam->m_len != sizeof (*sin))
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c
index 42cf46d..fe9216d 100644
--- a/sys/netinet/in_rmx.c
+++ b/sys/netinet/in_rmx.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: in_rmx.c,v 1.15 1995/07/10 15:39:10 wollman Exp $
+ * $Id: in_rmx.c,v 1.16 1995/09/18 15:51:32 wollman Exp $
*/
/*
@@ -204,7 +204,6 @@ static int
in_rtqkill(struct radix_node *rn, void *rock)
{
struct rtqk_arg *ap = rock;
- struct radix_node_head *rnh = ap->rnh;
struct rtentry *rt = (struct rtentry *)rn;
int err;
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c
index aa6fc22..d6cfa42 100644
--- a/sys/netinet/ip_fw.c
+++ b/sys/netinet/ip_fw.c
@@ -11,7 +11,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_fw.c,v 1.22 1995/07/31 13:58:35 gpalmer Exp $
+ * $Id: ip_fw.c,v 1.24 1995/10/23 03:58:06 ugen Exp $
*/
/*
@@ -851,7 +851,7 @@ clr_entry(chainptr, frwl)
struct ip_fw **chainptr;
struct ip_fw *frwl;
{
- struct ip_fw *ftmp, *ltmp;
+ struct ip_fw *ftmp;
u_short tport1, tport2, tmpnum;
char matches, was_found;
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 52a77c1..0d74d83 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -9,7 +9,7 @@
* Modified by Bill Fenner, PARC, April 1995
*
* MROUTING Revision: 3.5
- * $Id: ip_mroute.c,v 1.22 1995/08/23 18:20:15 wollman Exp $
+ * $Id: ip_mroute.c,v 1.23 1995/10/06 19:30:43 wollman Exp $
*/
@@ -496,7 +496,6 @@ ip_mrouter_init(so, m)
struct mbuf *m;
{
int *v;
- int i;
if (mrtdebug)
log(LOG_DEBUG,"ip_mrouter_init: so_type = %d, pr_protocol = %d\n",
@@ -540,7 +539,6 @@ X_ip_mrouter_done()
struct ifnet *ifp;
struct ifreq ifr;
struct mbuf *mb_rt;
- struct mfc *rt;
struct mbuf *m;
struct rtdetq *rte;
int s;
@@ -1008,7 +1006,7 @@ del_mfc(mfccp)
struct mbuf *mb_rt;
struct mbuf **nptr;
u_long hash;
- int s, i;
+ int s;
origin = mfccp->mfcc_origin;
mcastgrp = mfccp->mfcc_mcastgrp;
@@ -1086,7 +1084,6 @@ X_ip_mforward(ip, ifp, m, imo)
{
register struct mfc *rt = 0; /* XXX uninit warning */
register u_char *ipoptions;
- static struct sockproto k_igmpproto = { AF_INET, IPPROTO_IGMP };
static struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
static int srctun = 0;
register struct mbuf *mm;
@@ -1376,7 +1373,6 @@ ip_mdq(m, ifp, rt, xmt_vif)
register struct ip *ip = mtod(m, struct ip *);
register vifi_t vifi;
register struct vif *vifp;
- register struct mbuf *tmp;
register int plen = ntohs(ip->ip_len);
/*
@@ -1551,7 +1547,6 @@ encap_send(ip, vifp, m)
{
register struct mbuf *mb_copy;
register struct ip *ip_copy;
- int hlen = ip->ip_hl << 2;
register int i, len = ip->ip_len;
/*
@@ -1851,7 +1846,6 @@ tbf_dq_sel(vifp, ip)
register struct vif *vifp;
register struct ip *ip;
{
- register int i;
register int s = splnet();
register u_int p;
register struct mbuf *m, *last;
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index d48a020..e1dbc246 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
- * $Id: nfs_bio.c,v 1.16 1995/07/07 11:01:30 dfr Exp $
+ * $Id: nfs_bio.c,v 1.17 1995/08/24 10:17:32 dfr Exp $
*/
#include <sys/param.h>
@@ -94,7 +94,6 @@ nfs_bioread(vp, uio, ioflag, cred)
daddr_t lbn, rabn;
int bufsize;
int nra, error = 0, n = 0, on = 0, not_readin;
- nfsquad_t tquad;
#ifdef DIAGNOSTIC
if (uio->uio_rw != UIO_READ)
@@ -413,7 +412,7 @@ nfs_write(ap)
struct buf *bp;
struct vattr vattr;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
- daddr_t lbn, bn;
+ daddr_t lbn;
int bufsize;
int n, on, error = 0, iomode, must_commit;
@@ -769,7 +768,6 @@ nfs_doio(bp, cr, p)
int error = 0, diff, len, iomode, must_commit = 0;
struct uio uio;
struct iovec io;
- nfsquad_t tquad;
vp = bp->b_vp;
np = VTONFS(vp);
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index 5bdda4a..5118f15 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
+ * $Id: nfs_subs.c,v 1.23 1995/08/24 10:17:35 dfr Exp $
*/
/*
@@ -1187,7 +1187,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
u_short vmode;
struct timespec mtime;
struct vnode *nvp;
- quad_t tval;
int v3 = NFS_ISV3(vp);
md = *mdp;
@@ -1681,7 +1680,6 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
int kerbflag;
{
register struct mount *mp;
- register struct nfsuid *uidp;
register int i;
struct ucred *credanon;
int error, exflags;
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c
index 56b7357..f7cd396 100644
--- a/sys/nfs/nfs_node.c
+++ b/sys/nfs/nfs_node.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.2 (Berkeley) 12/30/93
- * $Id: nfs_node.c,v 1.10 1995/07/21 10:25:13 davidg Exp $
+ * $Id: nfs_node.c,v 1.11 1995/07/22 03:32:18 davidg Exp $
*/
#include <sys/param.h>
@@ -268,7 +268,6 @@ nfs_lock(ap)
} */ *ap;
{
register struct vnode *vp = ap->a_vp;
- struct nfsnode *np = VTONFS(vp);
/*
* Ugh, another place where interruptible mounts will get hung.
diff --git a/sys/nfs/nfs_nqlease.c b/sys/nfs/nfs_nqlease.c
index f192969..e1c5366 100644
--- a/sys/nfs/nfs_nqlease.c
+++ b/sys/nfs/nfs_nqlease.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_nqlease.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_nqlease.c,v 1.14 1995/08/24 10:45:13 dfr Exp $
+ * $Id: nfs_nqlease.c,v 1.15 1995/08/24 11:04:02 davidg Exp $
*/
/*
@@ -769,7 +769,6 @@ nqnfsrv_vacated(nfsd, slp, procp, mrq)
struct mbuf *mrep = nfsd->nd_mrep, *md = nfsd->nd_md;
struct mbuf *nam = nfsd->nd_nam;
caddr_t dpos = nfsd->nd_dpos;
- struct ucred *cred = &nfsd->nd_cr;
register struct nqlease *lp;
register struct nqhost *lph;
struct nqlease *tlp = (struct nqlease *)0;
@@ -890,7 +889,7 @@ nqnfs_vacated(vp, cred)
register struct mbuf *m;
register int i;
register u_long *tl;
- register long t1, t2;
+ register long t2;
caddr_t bpos;
u_long xid;
int error = 0;
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 21d1891..228513e 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.23 1995/08/24 10:45:15 dfr Exp $
+ * $Id: nfs_serv.c,v 1.24 1995/08/24 11:39:31 davidg Exp $
*/
/*
@@ -709,7 +709,7 @@ nfsrv_write(nfsd, slp, procp, mrq)
register u_long *tl;
register long t1;
caddr_t bpos;
- int error = 0, rdonly, cache, siz, len, xfer, forat_ret = 1;
+ int error = 0, rdonly, cache, len, forat_ret = 1;
int ioflags, aftat_ret = 1, retlen, zeroing, adjust;
int stable = NFSV3WRITE_FILESYNC;
int v3 = (nfsd->nd_flag & ND_NFSV3);
@@ -903,7 +903,6 @@ nfsrv_writegather(ndp, slp, procp, mrq)
struct mbuf *mb, *mb2, *mreq, *mrep, *md;
struct vnode *vp;
struct uio io, *uiop = &io;
- off_t off;
u_quad_t frev, cur_usec;
#ifndef nolint
@@ -1521,15 +1520,13 @@ nfsrv_mknod(nfsd, slp, procp, mrq)
struct mbuf *nam = nfsd->nd_nam;
caddr_t dpos = nfsd->nd_dpos;
struct ucred *cred = &nfsd->nd_cr;
- register struct nfs_fattr *fp;
struct vattr va, dirfor, diraft;
register struct vattr *vap = &va;
register u_long *tl;
struct nameidata nd;
- register caddr_t cp;
register long t1;
caddr_t bpos;
- int error = 0, cache, len, tsize, dirfor_ret = 1, diraft_ret = 1;
+ int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
u_long major, minor;
enum vtype vtyp;
char *cp2;
@@ -1679,7 +1676,7 @@ nfsrv_remove(nfsd, slp, procp, mrq)
int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *dirp;
struct vattr dirfor, diraft;
nfsfh_t nfh;
@@ -1770,7 +1767,7 @@ nfsrv_rename(nfsd, slp, procp, mrq)
int tdirfor_ret = 1, tdiraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct nameidata fromnd, tond;
struct vnode *fvp, *tvp, *tdvp, *fdirp = (struct vnode *)0;
struct vnode *tdirp = (struct vnode *)0;
@@ -1986,7 +1983,7 @@ nfsrv_link(nfsd, slp, procp, mrq)
int error = 0, rdonly, cache, len, dirfor_ret = 1, diraft_ret = 1;
int getret = 1, v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *xp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft, at;
nfsfh_t nfh, dnfh;
@@ -2087,7 +2084,7 @@ nfsrv_symlink(nfsd, slp, procp, mrq)
register u_long *tl;
register long t1;
struct nfsv2_sattr *sp;
- char *bpos, *cp, *pathcp = (char *)0, *cp2;
+ char *bpos, *pathcp = (char *)0, *cp2;
struct uio io;
struct iovec iv;
int error = 0, cache, len, len2, dirfor_ret = 1, diraft_ret = 1;
@@ -2351,7 +2348,7 @@ nfsrv_rmdir(nfsd, slp, procp, mrq)
int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft;
nfsfh_t nfh;
@@ -3339,10 +3336,7 @@ nfsrv_null(nfsd, slp, procp, mrq)
struct proc *procp;
struct mbuf **mrq;
{
- struct mbuf *mrep = nfsd->nd_mrep, *md = nfsd->nd_md;
- struct mbuf *nam = nfsd->nd_nam;
- caddr_t dpos = nfsd->nd_dpos;
- struct ucred *cred = &nfsd->nd_cr;
+ struct mbuf *mrep = nfsd->nd_mrep;
caddr_t bpos;
int error = NFSERR_RETVOID, cache;
struct mbuf *mb, *mreq;
@@ -3366,10 +3360,7 @@ nfsrv_noop(nfsd, slp, procp, mrq)
struct proc *procp;
struct mbuf **mrq;
{
- struct mbuf *mrep = nfsd->nd_mrep, *md = nfsd->nd_md;
- struct mbuf *nam = nfsd->nd_nam;
- caddr_t dpos = nfsd->nd_dpos;
- struct ucred *cred = &nfsd->nd_cr;
+ struct mbuf *mrep = nfsd->nd_mrep;
caddr_t bpos;
int error, cache;
struct mbuf *mb, *mreq;
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 742134ae..427f304 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_socket.c,v 1.8 1995/06/27 11:06:39 dfr Exp $
+ * $Id: nfs_socket.c,v 1.9 1995/08/24 11:04:04 davidg Exp $
*/
/*
@@ -1180,7 +1180,6 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp)
if (nd->nd_flag & ND_KERBFULL) {
register struct nfsuid *nuidp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
for (nuidp = NUIDHASH(slp, nd->nd_cr.cr_uid)->lh_first;
nuidp != 0; nuidp = nuidp->nu_hash.le_next) {
@@ -1915,7 +1914,6 @@ nfs_getreq(nd, nfsd, has_header)
struct mbuf *mrep, *md;
register struct nfsuid *nuidp;
struct timeval tvin, tvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
mrep = nd->nd_mrep;
md = nd->nd_md;
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 5bdda4a..5118f15 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
+ * $Id: nfs_subs.c,v 1.23 1995/08/24 10:17:35 dfr Exp $
*/
/*
@@ -1187,7 +1187,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
u_short vmode;
struct timespec mtime;
struct vnode *nvp;
- quad_t tval;
int v3 = NFS_ISV3(vp);
md = *mdp;
@@ -1681,7 +1680,6 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
int kerbflag;
{
register struct mount *mp;
- register struct nfsuid *uidp;
register int i;
struct ucred *credanon;
int error, exflags;
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 35a50f4..786ce14 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_syscalls.c,v 1.6 1995/05/30 08:12:45 rgrimes Exp $
+ * $Id: nfs_syscalls.c,v 1.7 1995/06/27 11:06:50 dfr Exp $
*/
#include <sys/param.h>
@@ -427,7 +427,6 @@ nfssvc_nfsd(nsd, argp, p)
struct nfsd *nfsd = nsd->nsd_nfsd;
struct nfsrv_descript *nd = NULL;
struct mbuf *mreq;
- struct nfsuid *uidp;
int error = 0, cacherep, s, sotype, writes_todo;
u_quad_t cur_usec;
@@ -901,7 +900,6 @@ nfs_getnickauth(nmp, cred, auth_str, auth_len, verf_str, verf_len)
register struct nfsuid *nuidp;
register u_long *nickp, *verfp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
#ifdef DIAGNOSTIC
if (verf_len < (4 * NFSX_UNSIGNED))
@@ -974,7 +972,6 @@ nfs_savenickauth(nmp, cred, len, key, mdp, dposp, mrep)
struct mbuf *md = *mdp;
struct timeval ktvin, ktvout;
u_long nick;
- NFSKERBKEYSCHED_T keys;
char *dpos = *dposp, *cp2;
int deltasec, error = 0;
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index db6bbde..6d6a344 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
- * $Id: nfs_vnops.c,v 1.25 1995/10/22 09:32:42 davidg Exp $
+ * $Id: nfs_vnops.c,v 1.26 1995/10/22 09:37:45 davidg Exp $
*/
/*
@@ -90,11 +90,52 @@
#define vfs_busy_pages(bp, f)
#endif
+static int nfsspec_read __P((struct vop_read_args *));
+static int nfsspec_write __P((struct vop_write_args *));
+static int nfsfifo_read __P((struct vop_read_args *));
+static int nfsfifo_write __P((struct vop_write_args *));
+static int nfsspec_close __P((struct vop_close_args *));
+static int nfsfifo_close __P((struct vop_close_args *));
+static int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
+static int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
+static int nfs_lookup __P((struct vop_lookup_args *));
+static int nfs_create __P((struct vop_create_args *));
+static int nfs_mknod __P((struct vop_mknod_args *));
+static int nfs_open __P((struct vop_open_args *));
+static int nfs_close __P((struct vop_close_args *));
+static int nfs_access __P((struct vop_access_args *));
+static int nfs_getattr __P((struct vop_getattr_args *));
+static int nfs_setattr __P((struct vop_setattr_args *));
+static int nfs_read __P((struct vop_read_args *));
+static int nfs_mmap __P((struct vop_mmap_args *));
+static int nfs_fsync __P((struct vop_fsync_args *));
+static int nfs_remove __P((struct vop_remove_args *));
+static int nfs_link __P((struct vop_link_args *));
+static int nfs_rename __P((struct vop_rename_args *));
+static int nfs_mkdir __P((struct vop_mkdir_args *));
+static int nfs_rmdir __P((struct vop_rmdir_args *));
+static int nfs_symlink __P((struct vop_symlink_args *));
+static int nfs_readdir __P((struct vop_readdir_args *));
+static int nfs_bmap __P((struct vop_bmap_args *));
+static int nfs_strategy __P((struct vop_strategy_args *));
+static int nfs_lookitup __P((struct vnode *,char *,int,struct ucred *,struct proc *,struct nfsnode **));
+static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
+static int nfsspec_access __P((struct vop_access_args *));
+static int nfs_readlink __P((struct vop_readlink_args *));
+static int nfs_print __P((struct vop_print_args *));
+static int nfs_pathconf __P((struct vop_pathconf_args *));
+static int nfs_advlock __P((struct vop_advlock_args *));
+static int nfs_blkatoff __P((struct vop_blkatoff_args *));
+static int nfs_bwrite __P((struct vop_bwrite_args *));
+static int nfs_valloc __P((struct vop_valloc_args *));
+static int nfs_vfree __P((struct vop_vfree_args *));
+static int nfs_truncate __P((struct vop_truncate_args *));
+static int nfs_update __P((struct vop_update_args *));
/*
* Global vfs data structures for nfs
*/
int (**nfsv2_vnodeop_p)();
-struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, nfs_lookup }, /* lookup */
{ &vop_create_desc, nfs_create }, /* create */
@@ -145,7 +186,7 @@ struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_bwrite_desc, nfs_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
+static struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
{ &nfsv2_vnodeop_p, nfsv2_vnodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(nfsv2_vnodeop_opv_desc);
@@ -155,7 +196,7 @@ VNODEOP_SET(nfsv2_vnodeop_opv_desc);
* Special device vnode ops
*/
int (**spec_nfsv2nodeop_p)();
-struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
+static struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, spec_lookup }, /* lookup */
{ &vop_create_desc, spec_create }, /* create */
@@ -206,14 +247,14 @@ struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
+static struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
{ &spec_nfsv2nodeop_p, spec_nfsv2nodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(spec_nfsv2nodeop_opv_desc);
#endif
int (**fifo_nfsv2nodeop_p)();
-struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
+static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, fifo_lookup }, /* lookup */
{ &vop_create_desc, fifo_create }, /* create */
@@ -264,16 +305,16 @@ struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
+static struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
{ &fifo_nfsv2nodeop_p, fifo_nfsv2nodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
#endif
void nqnfs_clientlease();
-int nfs_commit();
-int nfs_removerpc();
-int nfs_renamerpc();
+static int nfs_commit();
+static int nfs_removerpc();
+static int nfs_renamerpc();
/*
* Global variables
@@ -286,31 +327,12 @@ int nfs_numasync = 0;
#define DIRHDSIZ (sizeof (struct dirent) - (MAXNAMLEN + 1))
/*
- * nfs null call from vfs.
- */
-int
-nfs_null(vp, cred, procp)
- struct vnode *vp;
- struct ucred *cred;
- struct proc *procp;
-{
- caddr_t bpos, dpos;
- int error = 0;
- struct mbuf *mreq, *mrep, *md, *mb;
-
- nfsm_reqhead(vp, NFSPROC_NULL, 0);
- nfsm_request(vp, NFSPROC_NULL, procp, cred);
- nfsm_reqdone;
- return (error);
-}
-
-/*
* nfs access vnode op.
* For nfs version 2, just return ok. File accesses may fail later.
* For nfs version 3, use the access rpc to check accessibility. If file modes
* are changed on the server, accesses might still fail later.
*/
-int
+static int
nfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -397,7 +419,7 @@ nfs_access(ap)
* if consistency is lost.
*/
/* ARGSUSED */
-int
+static int
nfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -498,7 +520,7 @@ nfs_open(ap)
* cases where write errors are important.
*/
/* ARGSUSED */
-int
+static int
nfs_close(ap)
struct vop_close_args /* {
struct vnodeop_desc *a_desc;
@@ -533,7 +555,7 @@ nfs_close(ap)
/*
* nfs getattr call from vfs.
*/
-int
+static int
nfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -575,7 +597,7 @@ nfs_getattr(ap)
/*
* nfs setattr call.
*/
-int
+static int
nfs_setattr(ap)
struct vop_setattr_args /* {
struct vnodeop_desc *a_desc;
@@ -652,7 +674,7 @@ nfs_setattr(ap)
/*
* Do an nfs setattr rpc.
*/
-int
+static int
nfs_setattrrpc(vp, vap, cred, procp)
register struct vnode *vp;
register struct vattr *vap;
@@ -666,7 +688,6 @@ nfs_setattrrpc(vp, vap, cred, procp)
u_long *tl;
int error = 0, wccflag = NFSV3_WCCRATTR;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
- u_quad_t frev;
int v3 = NFS_ISV3(vp);
nfsstats.rpccnt[NFSPROC_SETATTR]++;
@@ -765,7 +786,7 @@ nfs_setattrrpc(vp, vap, cred, procp)
* First look in cache
* If not found, unlock the directory nfsnode and do the rpc
*/
-int
+static int
nfs_lookup(ap)
struct vop_lookup_args /* {
struct vnodeop_desc *a_desc;
@@ -949,7 +970,7 @@ nfs_lookup(ap)
* nfs read call.
* Just call nfs_bioread() to do the work.
*/
-int
+static int
nfs_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -968,7 +989,7 @@ nfs_read(ap)
/*
* nfs readlink call
*/
-int
+static int
nfs_readlink(ap)
struct vop_readlink_args /* {
struct vnode *a_vp;
@@ -1096,8 +1117,6 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit)
caddr_t bpos, dpos, cp2;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
- struct nfsnode *np = VTONFS(vp);
- u_quad_t frev;
int error = 0, len, tsiz, wccflag = NFSV3_WCCRATTR, rlen, commit;
int v3 = NFS_ISV3(vp), committed = NFSV3WRITE_FILESYNC;
@@ -1188,7 +1207,7 @@ nfsmout:
* For NFS v2 this is a kludge. Use a create rpc but with the IFMT bits of the
* mode set to specify the file type and the size field for rdev.
*/
-int
+static int
nfs_mknodrpc(dvp, vpp, cnp, vap)
register struct vnode *dvp;
register struct vnode **vpp;
@@ -1286,7 +1305,7 @@ nfs_mknodrpc(dvp, vpp, cnp, vap)
* just call nfs_mknodrpc() to do the work.
*/
/* ARGSUSED */
-int
+static int
nfs_mknod(ap)
struct vop_mknod_args /* {
struct vnode *a_dvp;
@@ -1308,7 +1327,7 @@ static u_long create_verf;
/*
* nfs file create call
*/
-int
+static int
nfs_create(ap)
struct vop_create_args /* {
struct vnode *a_dvp;
@@ -1427,7 +1446,7 @@ again:
* else
* do the remove rpc
*/
-int
+static int
nfs_remove(ap)
struct vop_remove_args /* {
struct vnodeop_desc *a_desc;
@@ -1440,14 +1459,8 @@ nfs_remove(ap)
register struct vnode *dvp = ap->a_dvp;
register struct componentname *cnp = ap->a_cnp;
register struct nfsnode *np = VTONFS(vp);
- register u_long *tl;
- register caddr_t cp;
- register long t2;
- caddr_t bpos, dpos;
int error = 0;
- struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct vattr vattr;
- int v3 = NFS_ISV3(dvp);
#ifndef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
@@ -1510,7 +1523,7 @@ nfs_removeit(sp)
/*
* Nfs remove rpc, called from nfs_remove() and nfs_removeit().
*/
-int
+static int
nfs_removerpc(dvp, name, namelen, cred, proc)
register struct vnode *dvp;
char *name;
@@ -1544,7 +1557,7 @@ nfs_removerpc(dvp, name, namelen, cred, proc)
/*
* nfs file rename call
*/
-int
+static int
nfs_rename(ap)
struct vop_rename_args /* {
struct vnode *a_fdvp;
@@ -1614,7 +1627,7 @@ out:
/*
* nfs file rename rpc called from nfs_remove() above
*/
-int
+static int
nfs_renameit(sdvp, scnp, sp)
struct vnode *sdvp;
struct componentname *scnp;
@@ -1627,7 +1640,7 @@ nfs_renameit(sdvp, scnp, sp)
/*
* Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit().
*/
-int
+static int
nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
register struct vnode *fdvp;
char *fnameptr;
@@ -1672,7 +1685,7 @@ nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
/*
* nfs hard link create call
*/
-int
+static int
nfs_link(ap)
struct vop_link_args /* {
struct vnode *a_tdvp;
@@ -1746,7 +1759,7 @@ nfs_link(ap)
/*
* nfs symbolic link create call
*/
-int
+static int
nfs_symlink(ap)
struct vop_symlink_args /* {
struct vnode *a_dvp;
@@ -1816,7 +1829,7 @@ nfs_symlink(ap)
/*
* nfs make dir call
*/
-int
+static int
nfs_mkdir(ap)
struct vop_mkdir_args /* {
struct vnode *a_dvp;
@@ -1837,9 +1850,8 @@ nfs_mkdir(ap)
struct nfsnode *np = (struct nfsnode *)0;
struct vnode *newvp = (struct vnode *)0;
caddr_t bpos, dpos, cp2;
- nfsfh_t *fhp;
- int error = 0, wccflag = NFSV3_WCCRATTR, attrflag;
- int fhsize, gotvp = 0;
+ int error = 0, wccflag = NFSV3_WCCRATTR;
+ int gotvp = 0;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct vattr vattr;
int v3 = NFS_ISV3(dvp);
@@ -1906,7 +1918,7 @@ nfs_mkdir(ap)
/*
* nfs remove directory call
*/
-int
+static int
nfs_rmdir(ap)
struct vop_rmdir_args /* {
struct vnode *a_dvp;
@@ -1959,7 +1971,7 @@ nfs_rmdir(ap)
/*
* nfs readdir call
*/
-int
+static int
nfs_readdir(ap)
struct vop_readdir_args /* {
struct vnode *a_vp;
@@ -2025,10 +2037,9 @@ nfs_readdirrpc(vp, uiop, cred)
nfsuint64 cookie;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct nfsnode *dnp = VTONFS(vp);
- nfsfh_t *fhp;
- u_quad_t frev, fileno;
- int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1, i;
- int cachable, attrflag, fhsize;
+ u_quad_t fileno;
+ int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1;
+ int attrflag;
int v3 = NFS_ISV3(vp);
#ifndef nolint
@@ -2214,9 +2225,9 @@ nfs_readdirplusrpc(vp, uiop, cred)
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct nfsnode *dnp = VTONFS(vp), *np;
nfsfh_t *fhp;
- u_quad_t frev, fileno;
+ u_quad_t fileno;
int error = 0, tlen, more_dirs = 1, blksiz = 0, doit, bigenough = 1, i;
- int cachable, attrflag, fhsize;
+ int attrflag, fhsize;
#ifndef nolint
dp = (struct dirent *)0;
@@ -2432,7 +2443,7 @@ static char hextoasc[] = "0123456789abcdef";
* to create the same funny name between the nfs_lookitup() fails and the
* nfs_rename() completes, but...
*/
-int
+static int
nfs_sillyrename(dvp, vp, cnp)
struct vnode *dvp, *vp;
struct componentname *cnp;
@@ -2493,7 +2504,7 @@ bad:
* handled too
* *npp != NULL --> update the file handle in the vnode
*/
-int
+static int
nfs_lookitup(dvp, name, len, cred, procp, npp)
register struct vnode *dvp;
char *name;
@@ -2572,7 +2583,7 @@ nfs_lookitup(dvp, name, len, cred, procp, npp)
/*
* Nfs Version 3 commit rpc
*/
-int
+static int
nfs_commit(vp, offset, cnt, cred, procp)
register struct vnode *vp;
u_quad_t offset;
@@ -2621,7 +2632,7 @@ nfs_commit(vp, offset, cnt, cred, procp)
* a lot more work than bcopy() and also it currently happens in the
* context of the swapper process (2).
*/
-int
+static int
nfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -2651,7 +2662,7 @@ nfs_bmap(ap)
* calling nfs_asyncio(), otherwise just all nfs_doio() to do the
* request.
*/
-int
+static int
nfs_strategy(ap)
struct vop_strategy_args *ap;
{
@@ -2687,7 +2698,7 @@ nfs_strategy(ap)
* NB Currently unsupported.
*/
/* ARGSUSED */
-int
+static int
nfs_mmap(ap)
struct vop_mmap_args /* {
struct vnode *a_vp;
@@ -2704,7 +2715,7 @@ nfs_mmap(ap)
* fsync vnode op. Just call nfs_flush() with commit == 1.
*/
/* ARGSUSED */
-int
+static int
nfs_fsync(ap)
struct vop_fsync_args /* {
struct vnodeop_desc *a_desc;
@@ -2723,7 +2734,7 @@ nfs_fsync(ap)
* Walk through the buffer pool and push any dirty pages
* associated with the vnode.
*/
-int
+static int
nfs_flush(vp, cred, waitfor, p, commit)
register struct vnode *vp;
struct ucred *cred;
@@ -2919,7 +2930,7 @@ loop:
* for V2.
*/
/* ARGSUSED */
-int
+static int
nfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
@@ -2935,7 +2946,7 @@ nfs_pathconf(ap)
* NFS advisory byte-level locks.
* Currently unsupported.
*/
-int
+static int
nfs_advlock(ap)
struct vop_advlock_args /* {
struct vnode *a_vp;
@@ -2962,7 +2973,7 @@ nfs_advlock(ap)
/*
* Print out the contents of an nfsnode.
*/
-int
+static int
nfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@@ -2983,7 +2994,7 @@ nfs_print(ap)
* NFS directory offset lookup.
* Currently unsupported.
*/
-int
+static int
nfs_blkatoff(ap)
struct vop_blkatoff_args /* {
struct vnode *a_vp;
@@ -3000,7 +3011,7 @@ nfs_blkatoff(ap)
* NFS flat namespace allocation.
* Currently unsupported.
*/
-int
+static int
nfs_valloc(ap)
struct vop_valloc_args /* {
struct vnode *a_pvp;
@@ -3017,7 +3028,7 @@ nfs_valloc(ap)
* NFS flat namespace free.
* Currently unsupported.
*/
-int
+static int
nfs_vfree(ap)
struct vop_vfree_args /* {
struct vnode *a_pvp;
@@ -3032,7 +3043,7 @@ nfs_vfree(ap)
/*
* NFS file truncation.
*/
-int
+static int
nfs_truncate(ap)
struct vop_truncate_args /* {
struct vnode *a_vp;
@@ -3051,7 +3062,7 @@ nfs_truncate(ap)
/*
* NFS update.
*/
-int
+static int
nfs_update(ap)
struct vop_update_args /* {
struct vnode *a_vp;
@@ -3071,7 +3082,7 @@ nfs_update(ap)
/*
* Just call nfs_writebp() with the force argument set to 1.
*/
-int
+static int
nfs_bwrite(ap)
struct vop_bwrite_args /* {
struct vnode *a_bp;
@@ -3148,7 +3159,7 @@ nfs_writebp(bp, force)
* Essentially just get vattr and then imitate iaccess() since the device is
* local to the client.
*/
-int
+static int
nfsspec_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -3209,7 +3220,7 @@ found:
/*
* Read wrapper for special devices.
*/
-int
+static int
nfsspec_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -3232,7 +3243,7 @@ nfsspec_read(ap)
/*
* Write wrapper for special devices.
*/
-int
+static int
nfsspec_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -3257,7 +3268,7 @@ nfsspec_write(ap)
*
* Update the times on the nfsnode then do device close.
*/
-int
+static int
nfsspec_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -3288,7 +3299,7 @@ nfsspec_close(ap)
/*
* Read wrapper for fifos.
*/
-int
+static int
nfsfifo_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -3311,7 +3322,7 @@ nfsfifo_read(ap)
/*
* Write wrapper for fifos.
*/
-int
+static int
nfsfifo_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -3336,7 +3347,7 @@ nfsfifo_write(ap)
*
* Update the times on the nfsnode then do fifo close.
*/
-int
+static int
nfsfifo_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h
index 0bd359f..c5e0534 100644
--- a/sys/nfs/nfsnode.h
+++ b/sys/nfs/nfsnode.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsnode.h 8.4 (Berkeley) 2/13/94
- * $Id: nfsnode.h,v 1.10 1995/06/27 11:06:57 dfr Exp $
+ * $Id: nfsnode.h,v 1.11 1995/07/29 11:42:23 bde Exp $
*/
#ifndef _NFS_NFSNODE_H_
@@ -158,18 +158,6 @@ extern int (**spec_nfsv2nodeop_p)();
/*
* Prototypes for NFS vnode operations
*/
-int nfs_lookup __P((struct vop_lookup_args *));
-int nfs_create __P((struct vop_create_args *));
-int nfs_mknod __P((struct vop_mknod_args *));
-int nfs_open __P((struct vop_open_args *));
-int nfs_close __P((struct vop_close_args *));
-int nfsspec_close __P((struct vop_close_args *));
-int nfsfifo_close __P((struct vop_close_args *));
-int nfs_access __P((struct vop_access_args *));
-int nfsspec_access __P((struct vop_access_args *));
-int nfs_getattr __P((struct vop_getattr_args *));
-int nfs_setattr __P((struct vop_setattr_args *));
-int nfs_read __P((struct vop_read_args *));
int nfs_write __P((struct vop_write_args *));
#ifdef HAS_VOPLEASE
#define nfs_lease_check ((int (*) __P((struct vop_lease_args *)))nullop)
@@ -181,52 +169,25 @@ int nfs_write __P((struct vop_write_args *));
#define nqnfs_lease_check lease_check
#endif
#endif
-int nfsspec_read __P((struct vop_read_args *));
-int nfsspec_write __P((struct vop_write_args *));
-int nfsfifo_read __P((struct vop_read_args *));
-int nfsfifo_write __P((struct vop_write_args *));
#define nfs_ioctl ((int (*) __P((struct vop_ioctl_args *)))enoioctl)
#define nfs_select ((int (*) __P((struct vop_select_args *)))seltrue)
#ifdef HAS_VOPREVOKE
#define nfs_revoke vop_revoke
#endif
-int nfs_mmap __P((struct vop_mmap_args *));
-int nfs_fsync __P((struct vop_fsync_args *));
#define nfs_seek ((int (*) __P((struct vop_seek_args *)))nullop)
-int nfs_remove __P((struct vop_remove_args *));
-int nfs_link __P((struct vop_link_args *));
-int nfs_rename __P((struct vop_rename_args *));
-int nfs_mkdir __P((struct vop_mkdir_args *));
-int nfs_rmdir __P((struct vop_rmdir_args *));
-int nfs_symlink __P((struct vop_symlink_args *));
-int nfs_readdir __P((struct vop_readdir_args *));
-int nfs_readlink __P((struct vop_readlink_args *));
int nfs_abortop __P((struct vop_abortop_args *));
int nfs_inactive __P((struct vop_inactive_args *));
int nfs_reclaim __P((struct vop_reclaim_args *));
int nfs_lock __P((struct vop_lock_args *));
int nfs_unlock __P((struct vop_unlock_args *));
-int nfs_bmap __P((struct vop_bmap_args *));
-int nfs_strategy __P((struct vop_strategy_args *));
-int nfs_print __P((struct vop_print_args *));
int nfs_islocked __P((struct vop_islocked_args *));
-int nfs_pathconf __P((struct vop_pathconf_args *));
-int nfs_advlock __P((struct vop_advlock_args *));
-int nfs_blkatoff __P((struct vop_blkatoff_args *));
-int nfs_bwrite __P((struct vop_bwrite_args *));
int nfs_vget __P((struct mount *, ino_t, struct vnode **));
-int nfs_valloc __P((struct vop_valloc_args *));
#define nfs_reallocblks \
((int (*) __P((struct vop_reallocblks_args *)))eopnotsupp)
-int nfs_vfree __P((struct vop_vfree_args *));
-int nfs_truncate __P((struct vop_truncate_args *));
-int nfs_update __P((struct vop_update_args *));
/* other stuff */
int nfs_removeit __P((struct sillyrename *));
int nfs_nget __P((struct mount *,nfsfh_t *,int,struct nfsnode **));
-int nfs_lookitup __P((struct vnode *,char *,int,struct ucred *,struct proc *,struct nfsnode **));
-int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
nfsuint64 *nfs_getcookie __P((struct nfsnode *, off_t, int));
void nfs_invaldir __P((struct vnode *));
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfsclient/nfs.h
+++ b/sys/nfsclient/nfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index d48a020..e1dbc246 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
- * $Id: nfs_bio.c,v 1.16 1995/07/07 11:01:30 dfr Exp $
+ * $Id: nfs_bio.c,v 1.17 1995/08/24 10:17:32 dfr Exp $
*/
#include <sys/param.h>
@@ -94,7 +94,6 @@ nfs_bioread(vp, uio, ioflag, cred)
daddr_t lbn, rabn;
int bufsize;
int nra, error = 0, n = 0, on = 0, not_readin;
- nfsquad_t tquad;
#ifdef DIAGNOSTIC
if (uio->uio_rw != UIO_READ)
@@ -413,7 +412,7 @@ nfs_write(ap)
struct buf *bp;
struct vattr vattr;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
- daddr_t lbn, bn;
+ daddr_t lbn;
int bufsize;
int n, on, error = 0, iomode, must_commit;
@@ -769,7 +768,6 @@ nfs_doio(bp, cr, p)
int error = 0, diff, len, iomode, must_commit = 0;
struct uio uio;
struct iovec io;
- nfsquad_t tquad;
vp = bp->b_vp;
np = VTONFS(vp);
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 35a50f4..786ce14 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_syscalls.c,v 1.6 1995/05/30 08:12:45 rgrimes Exp $
+ * $Id: nfs_syscalls.c,v 1.7 1995/06/27 11:06:50 dfr Exp $
*/
#include <sys/param.h>
@@ -427,7 +427,6 @@ nfssvc_nfsd(nsd, argp, p)
struct nfsd *nfsd = nsd->nsd_nfsd;
struct nfsrv_descript *nd = NULL;
struct mbuf *mreq;
- struct nfsuid *uidp;
int error = 0, cacherep, s, sotype, writes_todo;
u_quad_t cur_usec;
@@ -901,7 +900,6 @@ nfs_getnickauth(nmp, cred, auth_str, auth_len, verf_str, verf_len)
register struct nfsuid *nuidp;
register u_long *nickp, *verfp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
#ifdef DIAGNOSTIC
if (verf_len < (4 * NFSX_UNSIGNED))
@@ -974,7 +972,6 @@ nfs_savenickauth(nmp, cred, len, key, mdp, dposp, mrep)
struct mbuf *md = *mdp;
struct timeval ktvin, ktvout;
u_long nick;
- NFSKERBKEYSCHED_T keys;
char *dpos = *dposp, *cp2;
int deltasec, error = 0;
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c
index 56b7357..f7cd396 100644
--- a/sys/nfsclient/nfs_node.c
+++ b/sys/nfsclient/nfs_node.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.2 (Berkeley) 12/30/93
- * $Id: nfs_node.c,v 1.10 1995/07/21 10:25:13 davidg Exp $
+ * $Id: nfs_node.c,v 1.11 1995/07/22 03:32:18 davidg Exp $
*/
#include <sys/param.h>
@@ -268,7 +268,6 @@ nfs_lock(ap)
} */ *ap;
{
register struct vnode *vp = ap->a_vp;
- struct nfsnode *np = VTONFS(vp);
/*
* Ugh, another place where interruptible mounts will get hung.
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 742134ae..427f304 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_socket.c,v 1.8 1995/06/27 11:06:39 dfr Exp $
+ * $Id: nfs_socket.c,v 1.9 1995/08/24 11:04:04 davidg Exp $
*/
/*
@@ -1180,7 +1180,6 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp)
if (nd->nd_flag & ND_KERBFULL) {
register struct nfsuid *nuidp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
for (nuidp = NUIDHASH(slp, nd->nd_cr.cr_uid)->lh_first;
nuidp != 0; nuidp = nuidp->nu_hash.le_next) {
@@ -1915,7 +1914,6 @@ nfs_getreq(nd, nfsd, has_header)
struct mbuf *mrep, *md;
register struct nfsuid *nuidp;
struct timeval tvin, tvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
mrep = nd->nd_mrep;
md = nd->nd_md;
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index 5bdda4a..5118f15 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
+ * $Id: nfs_subs.c,v 1.23 1995/08/24 10:17:35 dfr Exp $
*/
/*
@@ -1187,7 +1187,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
u_short vmode;
struct timespec mtime;
struct vnode *nvp;
- quad_t tval;
int v3 = NFS_ISV3(vp);
md = *mdp;
@@ -1681,7 +1680,6 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
int kerbflag;
{
register struct mount *mp;
- register struct nfsuid *uidp;
register int i;
struct ucred *credanon;
int error, exflags;
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index db6bbde..6d6a344 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
- * $Id: nfs_vnops.c,v 1.25 1995/10/22 09:32:42 davidg Exp $
+ * $Id: nfs_vnops.c,v 1.26 1995/10/22 09:37:45 davidg Exp $
*/
/*
@@ -90,11 +90,52 @@
#define vfs_busy_pages(bp, f)
#endif
+static int nfsspec_read __P((struct vop_read_args *));
+static int nfsspec_write __P((struct vop_write_args *));
+static int nfsfifo_read __P((struct vop_read_args *));
+static int nfsfifo_write __P((struct vop_write_args *));
+static int nfsspec_close __P((struct vop_close_args *));
+static int nfsfifo_close __P((struct vop_close_args *));
+static int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
+static int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
+static int nfs_lookup __P((struct vop_lookup_args *));
+static int nfs_create __P((struct vop_create_args *));
+static int nfs_mknod __P((struct vop_mknod_args *));
+static int nfs_open __P((struct vop_open_args *));
+static int nfs_close __P((struct vop_close_args *));
+static int nfs_access __P((struct vop_access_args *));
+static int nfs_getattr __P((struct vop_getattr_args *));
+static int nfs_setattr __P((struct vop_setattr_args *));
+static int nfs_read __P((struct vop_read_args *));
+static int nfs_mmap __P((struct vop_mmap_args *));
+static int nfs_fsync __P((struct vop_fsync_args *));
+static int nfs_remove __P((struct vop_remove_args *));
+static int nfs_link __P((struct vop_link_args *));
+static int nfs_rename __P((struct vop_rename_args *));
+static int nfs_mkdir __P((struct vop_mkdir_args *));
+static int nfs_rmdir __P((struct vop_rmdir_args *));
+static int nfs_symlink __P((struct vop_symlink_args *));
+static int nfs_readdir __P((struct vop_readdir_args *));
+static int nfs_bmap __P((struct vop_bmap_args *));
+static int nfs_strategy __P((struct vop_strategy_args *));
+static int nfs_lookitup __P((struct vnode *,char *,int,struct ucred *,struct proc *,struct nfsnode **));
+static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
+static int nfsspec_access __P((struct vop_access_args *));
+static int nfs_readlink __P((struct vop_readlink_args *));
+static int nfs_print __P((struct vop_print_args *));
+static int nfs_pathconf __P((struct vop_pathconf_args *));
+static int nfs_advlock __P((struct vop_advlock_args *));
+static int nfs_blkatoff __P((struct vop_blkatoff_args *));
+static int nfs_bwrite __P((struct vop_bwrite_args *));
+static int nfs_valloc __P((struct vop_valloc_args *));
+static int nfs_vfree __P((struct vop_vfree_args *));
+static int nfs_truncate __P((struct vop_truncate_args *));
+static int nfs_update __P((struct vop_update_args *));
/*
* Global vfs data structures for nfs
*/
int (**nfsv2_vnodeop_p)();
-struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
+static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, nfs_lookup }, /* lookup */
{ &vop_create_desc, nfs_create }, /* create */
@@ -145,7 +186,7 @@ struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_bwrite_desc, nfs_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
+static struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
{ &nfsv2_vnodeop_p, nfsv2_vnodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(nfsv2_vnodeop_opv_desc);
@@ -155,7 +196,7 @@ VNODEOP_SET(nfsv2_vnodeop_opv_desc);
* Special device vnode ops
*/
int (**spec_nfsv2nodeop_p)();
-struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
+static struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, spec_lookup }, /* lookup */
{ &vop_create_desc, spec_create }, /* create */
@@ -206,14 +247,14 @@ struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
+static struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
{ &spec_nfsv2nodeop_p, spec_nfsv2nodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(spec_nfsv2nodeop_opv_desc);
#endif
int (**fifo_nfsv2nodeop_p)();
-struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
+static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, fifo_lookup }, /* lookup */
{ &vop_create_desc, fifo_create }, /* create */
@@ -264,16 +305,16 @@ struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
{ &vop_bwrite_desc, vn_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
};
-struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
+static struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
{ &fifo_nfsv2nodeop_p, fifo_nfsv2nodeop_entries };
#ifdef __FreeBSD__
VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
#endif
void nqnfs_clientlease();
-int nfs_commit();
-int nfs_removerpc();
-int nfs_renamerpc();
+static int nfs_commit();
+static int nfs_removerpc();
+static int nfs_renamerpc();
/*
* Global variables
@@ -286,31 +327,12 @@ int nfs_numasync = 0;
#define DIRHDSIZ (sizeof (struct dirent) - (MAXNAMLEN + 1))
/*
- * nfs null call from vfs.
- */
-int
-nfs_null(vp, cred, procp)
- struct vnode *vp;
- struct ucred *cred;
- struct proc *procp;
-{
- caddr_t bpos, dpos;
- int error = 0;
- struct mbuf *mreq, *mrep, *md, *mb;
-
- nfsm_reqhead(vp, NFSPROC_NULL, 0);
- nfsm_request(vp, NFSPROC_NULL, procp, cred);
- nfsm_reqdone;
- return (error);
-}
-
-/*
* nfs access vnode op.
* For nfs version 2, just return ok. File accesses may fail later.
* For nfs version 3, use the access rpc to check accessibility. If file modes
* are changed on the server, accesses might still fail later.
*/
-int
+static int
nfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -397,7 +419,7 @@ nfs_access(ap)
* if consistency is lost.
*/
/* ARGSUSED */
-int
+static int
nfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
@@ -498,7 +520,7 @@ nfs_open(ap)
* cases where write errors are important.
*/
/* ARGSUSED */
-int
+static int
nfs_close(ap)
struct vop_close_args /* {
struct vnodeop_desc *a_desc;
@@ -533,7 +555,7 @@ nfs_close(ap)
/*
* nfs getattr call from vfs.
*/
-int
+static int
nfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
@@ -575,7 +597,7 @@ nfs_getattr(ap)
/*
* nfs setattr call.
*/
-int
+static int
nfs_setattr(ap)
struct vop_setattr_args /* {
struct vnodeop_desc *a_desc;
@@ -652,7 +674,7 @@ nfs_setattr(ap)
/*
* Do an nfs setattr rpc.
*/
-int
+static int
nfs_setattrrpc(vp, vap, cred, procp)
register struct vnode *vp;
register struct vattr *vap;
@@ -666,7 +688,6 @@ nfs_setattrrpc(vp, vap, cred, procp)
u_long *tl;
int error = 0, wccflag = NFSV3_WCCRATTR;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
- u_quad_t frev;
int v3 = NFS_ISV3(vp);
nfsstats.rpccnt[NFSPROC_SETATTR]++;
@@ -765,7 +786,7 @@ nfs_setattrrpc(vp, vap, cred, procp)
* First look in cache
* If not found, unlock the directory nfsnode and do the rpc
*/
-int
+static int
nfs_lookup(ap)
struct vop_lookup_args /* {
struct vnodeop_desc *a_desc;
@@ -949,7 +970,7 @@ nfs_lookup(ap)
* nfs read call.
* Just call nfs_bioread() to do the work.
*/
-int
+static int
nfs_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -968,7 +989,7 @@ nfs_read(ap)
/*
* nfs readlink call
*/
-int
+static int
nfs_readlink(ap)
struct vop_readlink_args /* {
struct vnode *a_vp;
@@ -1096,8 +1117,6 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit)
caddr_t bpos, dpos, cp2;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
- struct nfsnode *np = VTONFS(vp);
- u_quad_t frev;
int error = 0, len, tsiz, wccflag = NFSV3_WCCRATTR, rlen, commit;
int v3 = NFS_ISV3(vp), committed = NFSV3WRITE_FILESYNC;
@@ -1188,7 +1207,7 @@ nfsmout:
* For NFS v2 this is a kludge. Use a create rpc but with the IFMT bits of the
* mode set to specify the file type and the size field for rdev.
*/
-int
+static int
nfs_mknodrpc(dvp, vpp, cnp, vap)
register struct vnode *dvp;
register struct vnode **vpp;
@@ -1286,7 +1305,7 @@ nfs_mknodrpc(dvp, vpp, cnp, vap)
* just call nfs_mknodrpc() to do the work.
*/
/* ARGSUSED */
-int
+static int
nfs_mknod(ap)
struct vop_mknod_args /* {
struct vnode *a_dvp;
@@ -1308,7 +1327,7 @@ static u_long create_verf;
/*
* nfs file create call
*/
-int
+static int
nfs_create(ap)
struct vop_create_args /* {
struct vnode *a_dvp;
@@ -1427,7 +1446,7 @@ again:
* else
* do the remove rpc
*/
-int
+static int
nfs_remove(ap)
struct vop_remove_args /* {
struct vnodeop_desc *a_desc;
@@ -1440,14 +1459,8 @@ nfs_remove(ap)
register struct vnode *dvp = ap->a_dvp;
register struct componentname *cnp = ap->a_cnp;
register struct nfsnode *np = VTONFS(vp);
- register u_long *tl;
- register caddr_t cp;
- register long t2;
- caddr_t bpos, dpos;
int error = 0;
- struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct vattr vattr;
- int v3 = NFS_ISV3(dvp);
#ifndef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
@@ -1510,7 +1523,7 @@ nfs_removeit(sp)
/*
* Nfs remove rpc, called from nfs_remove() and nfs_removeit().
*/
-int
+static int
nfs_removerpc(dvp, name, namelen, cred, proc)
register struct vnode *dvp;
char *name;
@@ -1544,7 +1557,7 @@ nfs_removerpc(dvp, name, namelen, cred, proc)
/*
* nfs file rename call
*/
-int
+static int
nfs_rename(ap)
struct vop_rename_args /* {
struct vnode *a_fdvp;
@@ -1614,7 +1627,7 @@ out:
/*
* nfs file rename rpc called from nfs_remove() above
*/
-int
+static int
nfs_renameit(sdvp, scnp, sp)
struct vnode *sdvp;
struct componentname *scnp;
@@ -1627,7 +1640,7 @@ nfs_renameit(sdvp, scnp, sp)
/*
* Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit().
*/
-int
+static int
nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
register struct vnode *fdvp;
char *fnameptr;
@@ -1672,7 +1685,7 @@ nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
/*
* nfs hard link create call
*/
-int
+static int
nfs_link(ap)
struct vop_link_args /* {
struct vnode *a_tdvp;
@@ -1746,7 +1759,7 @@ nfs_link(ap)
/*
* nfs symbolic link create call
*/
-int
+static int
nfs_symlink(ap)
struct vop_symlink_args /* {
struct vnode *a_dvp;
@@ -1816,7 +1829,7 @@ nfs_symlink(ap)
/*
* nfs make dir call
*/
-int
+static int
nfs_mkdir(ap)
struct vop_mkdir_args /* {
struct vnode *a_dvp;
@@ -1837,9 +1850,8 @@ nfs_mkdir(ap)
struct nfsnode *np = (struct nfsnode *)0;
struct vnode *newvp = (struct vnode *)0;
caddr_t bpos, dpos, cp2;
- nfsfh_t *fhp;
- int error = 0, wccflag = NFSV3_WCCRATTR, attrflag;
- int fhsize, gotvp = 0;
+ int error = 0, wccflag = NFSV3_WCCRATTR;
+ int gotvp = 0;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
struct vattr vattr;
int v3 = NFS_ISV3(dvp);
@@ -1906,7 +1918,7 @@ nfs_mkdir(ap)
/*
* nfs remove directory call
*/
-int
+static int
nfs_rmdir(ap)
struct vop_rmdir_args /* {
struct vnode *a_dvp;
@@ -1959,7 +1971,7 @@ nfs_rmdir(ap)
/*
* nfs readdir call
*/
-int
+static int
nfs_readdir(ap)
struct vop_readdir_args /* {
struct vnode *a_vp;
@@ -2025,10 +2037,9 @@ nfs_readdirrpc(vp, uiop, cred)
nfsuint64 cookie;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct nfsnode *dnp = VTONFS(vp);
- nfsfh_t *fhp;
- u_quad_t frev, fileno;
- int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1, i;
- int cachable, attrflag, fhsize;
+ u_quad_t fileno;
+ int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1;
+ int attrflag;
int v3 = NFS_ISV3(vp);
#ifndef nolint
@@ -2214,9 +2225,9 @@ nfs_readdirplusrpc(vp, uiop, cred)
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct nfsnode *dnp = VTONFS(vp), *np;
nfsfh_t *fhp;
- u_quad_t frev, fileno;
+ u_quad_t fileno;
int error = 0, tlen, more_dirs = 1, blksiz = 0, doit, bigenough = 1, i;
- int cachable, attrflag, fhsize;
+ int attrflag, fhsize;
#ifndef nolint
dp = (struct dirent *)0;
@@ -2432,7 +2443,7 @@ static char hextoasc[] = "0123456789abcdef";
* to create the same funny name between the nfs_lookitup() fails and the
* nfs_rename() completes, but...
*/
-int
+static int
nfs_sillyrename(dvp, vp, cnp)
struct vnode *dvp, *vp;
struct componentname *cnp;
@@ -2493,7 +2504,7 @@ bad:
* handled too
* *npp != NULL --> update the file handle in the vnode
*/
-int
+static int
nfs_lookitup(dvp, name, len, cred, procp, npp)
register struct vnode *dvp;
char *name;
@@ -2572,7 +2583,7 @@ nfs_lookitup(dvp, name, len, cred, procp, npp)
/*
* Nfs Version 3 commit rpc
*/
-int
+static int
nfs_commit(vp, offset, cnt, cred, procp)
register struct vnode *vp;
u_quad_t offset;
@@ -2621,7 +2632,7 @@ nfs_commit(vp, offset, cnt, cred, procp)
* a lot more work than bcopy() and also it currently happens in the
* context of the swapper process (2).
*/
-int
+static int
nfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -2651,7 +2662,7 @@ nfs_bmap(ap)
* calling nfs_asyncio(), otherwise just all nfs_doio() to do the
* request.
*/
-int
+static int
nfs_strategy(ap)
struct vop_strategy_args *ap;
{
@@ -2687,7 +2698,7 @@ nfs_strategy(ap)
* NB Currently unsupported.
*/
/* ARGSUSED */
-int
+static int
nfs_mmap(ap)
struct vop_mmap_args /* {
struct vnode *a_vp;
@@ -2704,7 +2715,7 @@ nfs_mmap(ap)
* fsync vnode op. Just call nfs_flush() with commit == 1.
*/
/* ARGSUSED */
-int
+static int
nfs_fsync(ap)
struct vop_fsync_args /* {
struct vnodeop_desc *a_desc;
@@ -2723,7 +2734,7 @@ nfs_fsync(ap)
* Walk through the buffer pool and push any dirty pages
* associated with the vnode.
*/
-int
+static int
nfs_flush(vp, cred, waitfor, p, commit)
register struct vnode *vp;
struct ucred *cred;
@@ -2919,7 +2930,7 @@ loop:
* for V2.
*/
/* ARGSUSED */
-int
+static int
nfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
@@ -2935,7 +2946,7 @@ nfs_pathconf(ap)
* NFS advisory byte-level locks.
* Currently unsupported.
*/
-int
+static int
nfs_advlock(ap)
struct vop_advlock_args /* {
struct vnode *a_vp;
@@ -2962,7 +2973,7 @@ nfs_advlock(ap)
/*
* Print out the contents of an nfsnode.
*/
-int
+static int
nfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@@ -2983,7 +2994,7 @@ nfs_print(ap)
* NFS directory offset lookup.
* Currently unsupported.
*/
-int
+static int
nfs_blkatoff(ap)
struct vop_blkatoff_args /* {
struct vnode *a_vp;
@@ -3000,7 +3011,7 @@ nfs_blkatoff(ap)
* NFS flat namespace allocation.
* Currently unsupported.
*/
-int
+static int
nfs_valloc(ap)
struct vop_valloc_args /* {
struct vnode *a_pvp;
@@ -3017,7 +3028,7 @@ nfs_valloc(ap)
* NFS flat namespace free.
* Currently unsupported.
*/
-int
+static int
nfs_vfree(ap)
struct vop_vfree_args /* {
struct vnode *a_pvp;
@@ -3032,7 +3043,7 @@ nfs_vfree(ap)
/*
* NFS file truncation.
*/
-int
+static int
nfs_truncate(ap)
struct vop_truncate_args /* {
struct vnode *a_vp;
@@ -3051,7 +3062,7 @@ nfs_truncate(ap)
/*
* NFS update.
*/
-int
+static int
nfs_update(ap)
struct vop_update_args /* {
struct vnode *a_vp;
@@ -3071,7 +3082,7 @@ nfs_update(ap)
/*
* Just call nfs_writebp() with the force argument set to 1.
*/
-int
+static int
nfs_bwrite(ap)
struct vop_bwrite_args /* {
struct vnode *a_bp;
@@ -3148,7 +3159,7 @@ nfs_writebp(bp, force)
* Essentially just get vattr and then imitate iaccess() since the device is
* local to the client.
*/
-int
+static int
nfsspec_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
@@ -3209,7 +3220,7 @@ found:
/*
* Read wrapper for special devices.
*/
-int
+static int
nfsspec_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -3232,7 +3243,7 @@ nfsspec_read(ap)
/*
* Write wrapper for special devices.
*/
-int
+static int
nfsspec_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -3257,7 +3268,7 @@ nfsspec_write(ap)
*
* Update the times on the nfsnode then do device close.
*/
-int
+static int
nfsspec_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
@@ -3288,7 +3299,7 @@ nfsspec_close(ap)
/*
* Read wrapper for fifos.
*/
-int
+static int
nfsfifo_read(ap)
struct vop_read_args /* {
struct vnode *a_vp;
@@ -3311,7 +3322,7 @@ nfsfifo_read(ap)
/*
* Write wrapper for fifos.
*/
-int
+static int
nfsfifo_write(ap)
struct vop_write_args /* {
struct vnode *a_vp;
@@ -3336,7 +3347,7 @@ nfsfifo_write(ap)
*
* Update the times on the nfsnode then do fifo close.
*/
-int
+static int
nfsfifo_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfsclient/nfsargs.h
+++ b/sys/nfsclient/nfsargs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h
index 0bd359f..c5e0534 100644
--- a/sys/nfsclient/nfsnode.h
+++ b/sys/nfsclient/nfsnode.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsnode.h 8.4 (Berkeley) 2/13/94
- * $Id: nfsnode.h,v 1.10 1995/06/27 11:06:57 dfr Exp $
+ * $Id: nfsnode.h,v 1.11 1995/07/29 11:42:23 bde Exp $
*/
#ifndef _NFS_NFSNODE_H_
@@ -158,18 +158,6 @@ extern int (**spec_nfsv2nodeop_p)();
/*
* Prototypes for NFS vnode operations
*/
-int nfs_lookup __P((struct vop_lookup_args *));
-int nfs_create __P((struct vop_create_args *));
-int nfs_mknod __P((struct vop_mknod_args *));
-int nfs_open __P((struct vop_open_args *));
-int nfs_close __P((struct vop_close_args *));
-int nfsspec_close __P((struct vop_close_args *));
-int nfsfifo_close __P((struct vop_close_args *));
-int nfs_access __P((struct vop_access_args *));
-int nfsspec_access __P((struct vop_access_args *));
-int nfs_getattr __P((struct vop_getattr_args *));
-int nfs_setattr __P((struct vop_setattr_args *));
-int nfs_read __P((struct vop_read_args *));
int nfs_write __P((struct vop_write_args *));
#ifdef HAS_VOPLEASE
#define nfs_lease_check ((int (*) __P((struct vop_lease_args *)))nullop)
@@ -181,52 +169,25 @@ int nfs_write __P((struct vop_write_args *));
#define nqnfs_lease_check lease_check
#endif
#endif
-int nfsspec_read __P((struct vop_read_args *));
-int nfsspec_write __P((struct vop_write_args *));
-int nfsfifo_read __P((struct vop_read_args *));
-int nfsfifo_write __P((struct vop_write_args *));
#define nfs_ioctl ((int (*) __P((struct vop_ioctl_args *)))enoioctl)
#define nfs_select ((int (*) __P((struct vop_select_args *)))seltrue)
#ifdef HAS_VOPREVOKE
#define nfs_revoke vop_revoke
#endif
-int nfs_mmap __P((struct vop_mmap_args *));
-int nfs_fsync __P((struct vop_fsync_args *));
#define nfs_seek ((int (*) __P((struct vop_seek_args *)))nullop)
-int nfs_remove __P((struct vop_remove_args *));
-int nfs_link __P((struct vop_link_args *));
-int nfs_rename __P((struct vop_rename_args *));
-int nfs_mkdir __P((struct vop_mkdir_args *));
-int nfs_rmdir __P((struct vop_rmdir_args *));
-int nfs_symlink __P((struct vop_symlink_args *));
-int nfs_readdir __P((struct vop_readdir_args *));
-int nfs_readlink __P((struct vop_readlink_args *));
int nfs_abortop __P((struct vop_abortop_args *));
int nfs_inactive __P((struct vop_inactive_args *));
int nfs_reclaim __P((struct vop_reclaim_args *));
int nfs_lock __P((struct vop_lock_args *));
int nfs_unlock __P((struct vop_unlock_args *));
-int nfs_bmap __P((struct vop_bmap_args *));
-int nfs_strategy __P((struct vop_strategy_args *));
-int nfs_print __P((struct vop_print_args *));
int nfs_islocked __P((struct vop_islocked_args *));
-int nfs_pathconf __P((struct vop_pathconf_args *));
-int nfs_advlock __P((struct vop_advlock_args *));
-int nfs_blkatoff __P((struct vop_blkatoff_args *));
-int nfs_bwrite __P((struct vop_bwrite_args *));
int nfs_vget __P((struct mount *, ino_t, struct vnode **));
-int nfs_valloc __P((struct vop_valloc_args *));
#define nfs_reallocblks \
((int (*) __P((struct vop_reallocblks_args *)))eopnotsupp)
-int nfs_vfree __P((struct vop_vfree_args *));
-int nfs_truncate __P((struct vop_truncate_args *));
-int nfs_update __P((struct vop_update_args *));
/* other stuff */
int nfs_removeit __P((struct sillyrename *));
int nfs_nget __P((struct mount *,nfsfh_t *,int,struct nfsnode **));
-int nfs_lookitup __P((struct vnode *,char *,int,struct ucred *,struct proc *,struct nfsnode **));
-int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
nfsuint64 *nfs_getcookie __P((struct nfsnode *, off_t, int));
void nfs_invaldir __P((struct vnode *));
diff --git a/sys/nfsclient/nfsstats.h b/sys/nfsclient/nfsstats.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfsclient/nfsstats.h
+++ b/sys/nfsclient/nfsstats.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfsserver/nfs.h
+++ b/sys/nfsserver/nfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 21d1891..228513e 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.23 1995/08/24 10:45:15 dfr Exp $
+ * $Id: nfs_serv.c,v 1.24 1995/08/24 11:39:31 davidg Exp $
*/
/*
@@ -709,7 +709,7 @@ nfsrv_write(nfsd, slp, procp, mrq)
register u_long *tl;
register long t1;
caddr_t bpos;
- int error = 0, rdonly, cache, siz, len, xfer, forat_ret = 1;
+ int error = 0, rdonly, cache, len, forat_ret = 1;
int ioflags, aftat_ret = 1, retlen, zeroing, adjust;
int stable = NFSV3WRITE_FILESYNC;
int v3 = (nfsd->nd_flag & ND_NFSV3);
@@ -903,7 +903,6 @@ nfsrv_writegather(ndp, slp, procp, mrq)
struct mbuf *mb, *mb2, *mreq, *mrep, *md;
struct vnode *vp;
struct uio io, *uiop = &io;
- off_t off;
u_quad_t frev, cur_usec;
#ifndef nolint
@@ -1521,15 +1520,13 @@ nfsrv_mknod(nfsd, slp, procp, mrq)
struct mbuf *nam = nfsd->nd_nam;
caddr_t dpos = nfsd->nd_dpos;
struct ucred *cred = &nfsd->nd_cr;
- register struct nfs_fattr *fp;
struct vattr va, dirfor, diraft;
register struct vattr *vap = &va;
register u_long *tl;
struct nameidata nd;
- register caddr_t cp;
register long t1;
caddr_t bpos;
- int error = 0, cache, len, tsize, dirfor_ret = 1, diraft_ret = 1;
+ int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
u_long major, minor;
enum vtype vtyp;
char *cp2;
@@ -1679,7 +1676,7 @@ nfsrv_remove(nfsd, slp, procp, mrq)
int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *dirp;
struct vattr dirfor, diraft;
nfsfh_t nfh;
@@ -1770,7 +1767,7 @@ nfsrv_rename(nfsd, slp, procp, mrq)
int tdirfor_ret = 1, tdiraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct nameidata fromnd, tond;
struct vnode *fvp, *tvp, *tdvp, *fdirp = (struct vnode *)0;
struct vnode *tdirp = (struct vnode *)0;
@@ -1986,7 +1983,7 @@ nfsrv_link(nfsd, slp, procp, mrq)
int error = 0, rdonly, cache, len, dirfor_ret = 1, diraft_ret = 1;
int getret = 1, v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *xp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft, at;
nfsfh_t nfh, dnfh;
@@ -2087,7 +2084,7 @@ nfsrv_symlink(nfsd, slp, procp, mrq)
register u_long *tl;
register long t1;
struct nfsv2_sattr *sp;
- char *bpos, *cp, *pathcp = (char *)0, *cp2;
+ char *bpos, *pathcp = (char *)0, *cp2;
struct uio io;
struct iovec iv;
int error = 0, cache, len, len2, dirfor_ret = 1, diraft_ret = 1;
@@ -2351,7 +2348,7 @@ nfsrv_rmdir(nfsd, slp, procp, mrq)
int error = 0, cache, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq, *mb2;
+ struct mbuf *mb, *mreq;
struct vnode *vp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft;
nfsfh_t nfh;
@@ -3339,10 +3336,7 @@ nfsrv_null(nfsd, slp, procp, mrq)
struct proc *procp;
struct mbuf **mrq;
{
- struct mbuf *mrep = nfsd->nd_mrep, *md = nfsd->nd_md;
- struct mbuf *nam = nfsd->nd_nam;
- caddr_t dpos = nfsd->nd_dpos;
- struct ucred *cred = &nfsd->nd_cr;
+ struct mbuf *mrep = nfsd->nd_mrep;
caddr_t bpos;
int error = NFSERR_RETVOID, cache;
struct mbuf *mb, *mreq;
@@ -3366,10 +3360,7 @@ nfsrv_noop(nfsd, slp, procp, mrq)
struct proc *procp;
struct mbuf **mrq;
{
- struct mbuf *mrep = nfsd->nd_mrep, *md = nfsd->nd_md;
- struct mbuf *nam = nfsd->nd_nam;
- caddr_t dpos = nfsd->nd_dpos;
- struct ucred *cred = &nfsd->nd_cr;
+ struct mbuf *mrep = nfsd->nd_mrep;
caddr_t bpos;
int error, cache;
struct mbuf *mb, *mreq;
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index 742134ae..427f304 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_socket.c,v 1.8 1995/06/27 11:06:39 dfr Exp $
+ * $Id: nfs_socket.c,v 1.9 1995/08/24 11:04:04 davidg Exp $
*/
/*
@@ -1180,7 +1180,6 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp)
if (nd->nd_flag & ND_KERBFULL) {
register struct nfsuid *nuidp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
for (nuidp = NUIDHASH(slp, nd->nd_cr.cr_uid)->lh_first;
nuidp != 0; nuidp = nuidp->nu_hash.le_next) {
@@ -1915,7 +1914,6 @@ nfs_getreq(nd, nfsd, has_header)
struct mbuf *mrep, *md;
register struct nfsuid *nuidp;
struct timeval tvin, tvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
mrep = nd->nd_mrep;
md = nd->nd_md;
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 5bdda4a..5118f15 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
+ * $Id: nfs_subs.c,v 1.23 1995/08/24 10:17:35 dfr Exp $
*/
/*
@@ -1187,7 +1187,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
u_short vmode;
struct timespec mtime;
struct vnode *nvp;
- quad_t tval;
int v3 = NFS_ISV3(vp);
md = *mdp;
@@ -1681,7 +1680,6 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
int kerbflag;
{
register struct mount *mp;
- register struct nfsuid *uidp;
register int i;
struct ucred *credanon;
int error, exflags;
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index 35a50f4..786ce14 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_syscalls.c,v 1.6 1995/05/30 08:12:45 rgrimes Exp $
+ * $Id: nfs_syscalls.c,v 1.7 1995/06/27 11:06:50 dfr Exp $
*/
#include <sys/param.h>
@@ -427,7 +427,6 @@ nfssvc_nfsd(nsd, argp, p)
struct nfsd *nfsd = nsd->nsd_nfsd;
struct nfsrv_descript *nd = NULL;
struct mbuf *mreq;
- struct nfsuid *uidp;
int error = 0, cacherep, s, sotype, writes_todo;
u_quad_t cur_usec;
@@ -901,7 +900,6 @@ nfs_getnickauth(nmp, cred, auth_str, auth_len, verf_str, verf_len)
register struct nfsuid *nuidp;
register u_long *nickp, *verfp;
struct timeval ktvin, ktvout;
- NFSKERBKEYSCHED_T keys; /* stores key schedule */
#ifdef DIAGNOSTIC
if (verf_len < (4 * NFSX_UNSIGNED))
@@ -974,7 +972,6 @@ nfs_savenickauth(nmp, cred, len, key, mdp, dposp, mrep)
struct mbuf *md = *mdp;
struct timeval ktvin, ktvout;
u_long nick;
- NFSKERBKEYSCHED_T keys;
char *dpos = *dposp, *cp2;
int deltasec, error = 0;
diff --git a/sys/nfsserver/nfsrvstats.h b/sys/nfsserver/nfsrvstats.h
index 2a3b3de..7b088bc 100644
--- a/sys/nfsserver/nfsrvstats.h
+++ b/sys/nfsserver/nfsrvstats.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.10 1995/06/27 11:06:33 dfr Exp $
+ * $Id: nfs.h,v 1.11 1995/07/29 11:42:21 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -490,7 +490,6 @@ int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *));
int nfs_asyncio __P((struct buf *,struct ucred *));
int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
@@ -537,7 +536,6 @@ int nfsrv_errmap __P((struct nfsrv_descript *, int));
void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int));
int nfs_writebp __P((struct buf *,int));
int nfsrv_vput __P(( struct vnode * ));
int nfsrv_vrele __P(( struct vnode * ));
diff --git a/sys/pci/if_pdq.c b/sys/pci/if_pdq.c
index 95d7716..7aeb495 100644
--- a/sys/pci/if_pdq.c
+++ b/sys/pci/if_pdq.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pdq.c,v 1.6 1995/05/30 08:13:04 rgrimes Exp $
+ * $Id: if_pdq.c,v 1.7 1995/10/13 19:48:06 wollman Exp $
*
*/
@@ -436,7 +436,7 @@ static char *pdq_pci_probe (pcici_t config_id, pcidi_t device_id);
static void pdq_pci_attach(pcici_t config_id, int unit);
static u_long pdq_pci_count;
-struct pci_device fpadevice = {
+static struct pci_device fpadevice = {
"fpa",
pdq_pci_probe,
pdq_pci_attach,
@@ -576,7 +576,7 @@ feaintr(
return unit;
}
-void
+static void
pdq_eisa_subprobe(
pdq_uint32_t iobase,
pdq_uint32_t *maddr,
@@ -590,7 +590,7 @@ pdq_eisa_subprobe(
*msize = (PDQ_OS_IORD_8(iobase + PDQ_EISA_MEM_ADD_MASK_0) + 4) << 8;
}
-void
+static void
pdq_eisa_devinit(
pdq_softc_t *sc)
{
diff --git a/sys/pci/pdq.c b/sys/pci/pdq.c
index 610458b..14fb80f 100644
--- a/sys/pci/pdq.c
+++ b/sys/pci/pdq.c
@@ -21,9 +21,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pdq.c,v 1.4 1995/04/01 01:43:56 davidg Exp $
+ * $Id: pdq.c,v 1.5 1995/05/30 08:13:13 rgrimes Exp $
*
* $Log: pdq.c,v $
+ * Revision 1.5 1995/05/30 08:13:13 rgrimes
+ * Remove trailing whitespace.
+ *
* Revision 1.4 1995/04/01 01:43:56 davidg
* Patch from Matt Thomas to fix mbuf leak in FDDI driver.
*
@@ -84,13 +87,37 @@
#define PDQ_PRINTF(x)
#endif
-const char * const pdq_halt_codes[] = {
+static void pdq_process_transmitted_data(pdq_t *pdq);
+static void pdq_flush_transmitter(pdq_t *pdq);
+static void pdq_print_fddi_chars(pdq_t *pdq, const pdq_response_status_chars_get_t *rsp);
+
+static void pdq_init_csrs(pdq_csrs_t *csrs, void *csrs_va, size_t csr_size);
+static void pdq_init_pci_csrs(pdq_pci_csrs_t *csrs, void *csrs_va, size_t csr_size);
+
+static void pdq_flush_databuf_queue(pdq_databuf_queue_t *q);
+
+static pdq_boolean_t pdq_do_port_control(const pdq_csrs_t * const csrs, pdq_uint32_t cmd);
+static void pdq_read_mla(const pdq_csrs_t * const csrs, pdq_lanaddr_t *hwaddr);
+static void pdq_read_fwrev(const pdq_csrs_t * const csrs, pdq_fwrev_t *fwrev);
+static pdq_boolean_t pdq_read_error_log(pdq_t *pdq, pdq_response_error_log_get_t *log_entry);
+static pdq_chip_rev_t pdq_read_chiprev(const pdq_csrs_t * const csrs);
+
+static void pdq_queue_commands(pdq_t *pdq);
+static void pdq_process_command_responses(pdq_t *pdq);
+static void pdq_process_unsolicited_events(pdq_t *pdq);
+
+static void pdq_process_received_data(pdq_t *pdq, pdq_rx_info_t *rx,
+ pdq_rxdesc_t *receives,
+ pdq_uint32_t completion_goal,
+ pdq_uint32_t ring_mask);
+
+static const char * const pdq_halt_codes[] = {
"Selftest Timeout", "Host Bus Parity Error", "Host Directed Fault",
"Software Fault", "Hardware Fault", "PC Trace Path Test",
"DMA Error", "Image CRC Error", "Adapter Processer Error"
};
-const char * const pdq_adapter_states[] = {
+static const char * const pdq_adapter_states[] = {
"Reset", "Upgrade", "DMA Unavailable", "DMA Available",
"Link Available", "Link Unavailable", "Halted", "Ring Member"
};
@@ -99,19 +126,19 @@ const char * const pdq_adapter_states[] = {
* The following are used in conjunction with
* unsolicited events
*/
-const char * const pdq_entities[] = {
+static const char * const pdq_entities[] = {
"Station", "Link", "Phy Port"
};
-const char * const pdq_station_events[] = {
+static const char * const pdq_station_events[] = {
"Trace Received"
};
-const char * const pdq_station_arguments[] = {
+static const char * const pdq_station_arguments[] = {
"Reason"
};
-const char * const pdq_link_events[] = {
+static const char * const pdq_link_events[] = {
"Transmit Underrun",
"Transmit Failed",
"Block Check Error (CRC)",
@@ -133,63 +160,63 @@ const char * const pdq_link_events[] = {
"Directed Beacon Received",
};
-const char * const pdq_link_arguments[] = {
+static const char * const pdq_link_arguments[] = {
"Reason",
"Data Link Header",
"Source",
"Upstream Neighbor"
};
-const char * const pdq_phy_events[] = {
+static const char * const pdq_phy_events[] = {
"LEM Error Monitor Reject",
"Elasticy Buffer Error",
"Link Confidence Test Reject"
};
-const char * const pdq_phy_arguments[] = {
+static const char * const pdq_phy_arguments[] = {
"Direction"
};
-const char * const * const pdq_event_arguments[] = {
+static const char * const * const pdq_event_arguments[] = {
pdq_station_arguments,
pdq_link_arguments,
pdq_phy_arguments
};
-const char * const * const pdq_event_codes[] = {
+static const char * const * const pdq_event_codes[] = {
pdq_station_events,
pdq_link_events,
pdq_phy_events
};
-const char * const pdq_station_types[] = {
+static const char * const pdq_station_types[] = {
"SAS", "DAC", "SAC", "NAC", "DAS"
};
-const char * const pdq_smt_versions[] = { "", "V6.2", "V7.2" };
+static const char * const pdq_smt_versions[] = { "", "V6.2", "V7.2" };
-const char pdq_phy_types[] = "ABSM";
+static const char pdq_phy_types[] = "ABSM";
-const char * const pdq_pmd_types0[] = {
+static const char * const pdq_pmd_types0[] = {
"ANSI Multi-Mode", "ANSI Single-Mode Type 1", "ANSI Single-Mode Type 2",
"ANSI Sonet"
};
-const char * const pdq_pmd_types100[] = {
+static const char * const pdq_pmd_types100[] = {
"Low Power", "Thin Wire", "Shielded Twisted Pair",
"Unshielded Twisted Pair"
};
-const char * const * const pdq_pmd_types[] = {
+static const char * const * const pdq_pmd_types[] = {
pdq_pmd_types0, pdq_pmd_types100
};
-const char * const pdq_descriptions[] = {
+static const char * const pdq_descriptions[] = {
"DEFPA PCI",
"DEFEA EISA",
};
-void
+static void
pdq_print_fddi_chars(
pdq_t *pdq,
const pdq_response_status_chars_get_t *rsp)
@@ -236,7 +263,7 @@ pdq_print_fddi_chars(
printf("\n");
}
-void
+static void
pdq_init_csrs(
pdq_csrs_t *csrs,
void *csr_va,
@@ -259,7 +286,7 @@ pdq_init_csrs(
csrs->csr_unsolicited_producer = &csr_base[13 * csrsize];
}
-void
+static void
pdq_init_pci_csrs(
pdq_pci_csrs_t *csrs,
void *csr_va,
@@ -273,7 +300,7 @@ pdq_init_pci_csrs(
csrs->csr_fifo_read = &csr_base[19 * csrsize];
}
-void
+static void
pdq_flush_databuf_queue(
pdq_databuf_queue_t *q)
{
@@ -286,7 +313,7 @@ pdq_flush_databuf_queue(
}
}
-pdq_boolean_t
+static pdq_boolean_t
pdq_do_port_control(
const pdq_csrs_t * const csrs,
pdq_uint32_t cmd)
@@ -306,7 +333,7 @@ pdq_do_port_control(
return PDQ_FALSE;
}
-void
+static void
pdq_read_mla(
const pdq_csrs_t * const csrs,
pdq_lanaddr_t *hwaddr)
@@ -330,7 +357,7 @@ pdq_read_mla(
hwaddr->lanaddr_bytes[5] = (data >> 8) & 0xFF;
}
-void
+static void
pdq_read_fwrev(
const pdq_csrs_t * const csrs,
pdq_fwrev_t *fwrev)
@@ -346,7 +373,7 @@ pdq_read_fwrev(
fwrev->fwrev_bytes[0] = (data >> 24) & 0xFF;
}
-pdq_boolean_t
+static pdq_boolean_t
pdq_read_error_log(
pdq_t *pdq,
pdq_response_error_log_get_t *log_entry)
@@ -364,7 +391,7 @@ pdq_read_error_log(
return (ptr == (pdq_uint32_t *) log_entry) ? PDQ_FALSE : PDQ_TRUE;
}
-pdq_chip_rev_t
+static pdq_chip_rev_t
pdq_read_chiprev(
const pdq_csrs_t * const csrs)
{
@@ -460,7 +487,7 @@ static const struct {
#endif
};
-void
+static void
pdq_queue_commands(
pdq_t *pdq)
{
@@ -610,7 +637,7 @@ pdq_queue_commands(
}
}
-void
+static void
pdq_process_command_responses(
pdq_t *pdq)
{
@@ -666,7 +693,7 @@ pdq_process_command_responses(
* event buffers so it can be used to initialize the queue
* as well.
*/
-void
+static void
pdq_process_unsolicited_events(
pdq_t *pdq)
{
@@ -713,7 +740,7 @@ pdq_process_unsolicited_events(
*csrs->csr_unsolicited_producer = ui->ui_producer | (ui->ui_completion << 8);
}
-void
+static void
pdq_process_received_data(
pdq_t *pdq,
pdq_rx_info_t *rx,
@@ -945,7 +972,7 @@ pdq_queue_transmit_data(
return PDQ_TRUE;
}
-void
+static void
pdq_process_transmitted_data(
pdq_t *pdq)
{
@@ -972,7 +999,7 @@ pdq_process_transmitted_data(
PDQ_DO_TYPE2_PRODUCER(pdq);
}
-void
+static void
pdq_flush_transmitter(
pdq_t *pdq)
{
diff --git a/sys/pci/pdq_os.h b/sys/pci/pdq_os.h
index a900c05..97bc73dc 100644
--- a/sys/pci/pdq_os.h
+++ b/sys/pci/pdq_os.h
@@ -21,9 +21,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pdq_os.h,v 1.2 1995/03/25 22:40:49 bde Exp $
+ * $Id: pdq_os.h,v 1.3 1995/07/16 10:07:20 bde Exp $
*
* $Log: pdq_os.h,v $
+ * Revision 1.3 1995/07/16 10:07:20 bde
+ * Fix compiler warnings (systm.h wasn't included).
+ *
* Revision 1.2 1995/03/25 22:40:49 bde
* Remove wrong redeclarations of printf() and bzero(). Include the correct
* header to declare DELAY().
@@ -175,31 +178,7 @@ extern void pdq_os_receive_pdu(pdq_t *, PDQ_OS_DATABUF_T *pdu, size_t pdulen);
extern void pdq_os_restart_transmitter(pdq_t *pdq);
extern void pdq_os_transmit_done(pdq_t *pdq, PDQ_OS_DATABUF_T *pdu);
-extern void pdq_print_fddi_chars(pdq_t *pdq, const pdq_response_status_chars_get_t *rsp);
-
-extern void pdq_init_csrs(pdq_csrs_t *csrs, void *csrs_va, size_t csr_size);
-extern void pdq_init_pci_csrs(pdq_pci_csrs_t *csrs, void *csrs_va, size_t csr_size);
-
-extern void pdq_flush_databuf_queue(pdq_databuf_queue_t *q);
-
-extern pdq_boolean_t pdq_do_port_control(const pdq_csrs_t * const csrs, pdq_uint32_t cmd);
-extern void pdq_read_mla(const pdq_csrs_t * const csrs, pdq_lanaddr_t *hwaddr);
-extern void pdq_read_fwrev(const pdq_csrs_t * const csrs, pdq_fwrev_t *fwrev);
-extern pdq_boolean_t pdq_read_error_log(pdq_t *pdq, pdq_response_error_log_get_t *log_entry);
-extern pdq_chip_rev_t pdq_read_chiprev(const pdq_csrs_t * const csrs);
-
-extern void pdq_queue_commands(pdq_t *pdq);
-extern void pdq_process_command_responses(pdq_t *pdq);
-extern void pdq_process_unsolicited_events(pdq_t *pdq);
-
-extern void pdq_process_received_data(pdq_t *pdq, pdq_rx_info_t *rx,
- pdq_rxdesc_t *receives,
- pdq_uint32_t completion_goal,
- pdq_uint32_t ring_mask);
-
extern pdq_boolean_t pdq_queue_transmit_data(pdq_t *pdq, PDQ_OS_DATABUF_T *pdu);
-extern void pdq_process_transmitted_data(pdq_t *pdq);
-extern void pdq_flush_transmitter(pdq_t *pdq);
extern pdq_state_t pdq_stop(pdq_t *pdq);
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index b89ca15..6994f22 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
-# $Id: vnode_if.sh,v 1.5 1995/09/04 00:20:18 dyson Exp $
+# $Id: vnode_if.sh,v 1.6 1995/09/11 16:05:16 bde Exp $
#
# Script to produce VFS front-end sugar.
@@ -275,7 +275,7 @@ $AWK 'function kill_surrounding_ws (s) {
}
function generate_operation_vp_offsets() {
- printf ("int %s_vp_offsets[] = {\n", name);
+ printf ("static int %s_vp_offsets[] = {\n", name);
# as a side effect, figure out the releflags
releflags = "";
vpnum = 0;
OpenPOWER on IntegriCloud