- ansify function definition trunk
authorcegger <cegger@NetBSD.org>
Fri, 24 Oct 2008 17:17:12 +0000
branchtrunk
changeset 174382 e41e987ccf02
parent 174381 8ac75386a200
child 174383 323434d14bf4
- ansify function definition - de- __P - u_int32_t -> uint32_t No functional changes.
sys/nfs/nfs_boot.c
sys/nfs/nfs_bootdhcp.c
sys/nfs/nfs_bootparam.c
sys/nfs/nfsdiskless.h
--- a/sys/nfs/nfs_boot.c	Fri Oct 24 17:14:29 2008 +0000
+++ b/sys/nfs/nfs_boot.c	Fri Oct 24 17:17:12 2008 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_boot.c,v 1.74 2008/08/06 15:01:23 plunky Exp $	*/
+/*	$NetBSD: nfs_boot.c,v 1.75 2008/10/24 17:17:12 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_boot.c,v 1.74 2008/08/06 15:01:23 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_boot.c,v 1.75 2008/10/24 17:17:12 cegger Exp $");
 
 #include "opt_nfs.h"
 #include "opt_tftproot.h"
@@ -102,9 +102,7 @@
  * save all the boot parameters in the nfs_diskless struct.
  */
 int
-nfs_boot_init(nd, lwp)
-	struct nfs_diskless *nd;
-	struct lwp *lwp;
+nfs_boot_init(struct nfs_diskless *nd, struct lwp *lwp)
 {
 	struct ifnet *ifp;
 	int error = 0;
@@ -172,9 +170,7 @@
 }
 
 void
-nfs_boot_cleanup(nd, lwp)
-	struct nfs_diskless *nd;
-	struct lwp *lwp;
+nfs_boot_cleanup(struct nfs_diskless *nd, struct lwp *lwp)
 {
 
 	nfs_boot_deladdress(nd->nd_ifp, lwp, nd->nd_myip.s_addr);
@@ -183,10 +179,7 @@
 }
 
 int
-nfs_boot_ifupdown(ifp, lwp, up)
-	struct ifnet *ifp;
-	struct lwp *lwp;
-	int up;
+nfs_boot_ifupdown(struct ifnet *ifp, struct lwp *lwp, int up)
 {
 	struct socket *so;
 	struct ifreq ireq;
@@ -234,10 +227,8 @@
 }
 
 int
-nfs_boot_setaddress(ifp, lwp, addr, netmask, braddr)
-	struct ifnet *ifp;
-	struct lwp *lwp;
-	u_int32_t addr, netmask, braddr;
+nfs_boot_setaddress(struct ifnet *ifp, struct lwp *lwp,
+		uint32_t addr, uint32_t netmask, uint32_t braddr)
 {
 	struct socket *so;
 	struct ifaliasreq iareq;
@@ -293,10 +284,7 @@
 }
 
 int
-nfs_boot_deladdress(ifp, lwp, addr)
-	struct ifnet *ifp;
-	struct lwp *lwp;
-	u_int32_t addr;
+nfs_boot_deladdress(struct ifnet *ifp, struct lwp *lwp, uint32_t addr)
 {
 	struct socket *so;
 	struct ifreq ifr;
@@ -332,8 +320,7 @@
 }
 
 int
-nfs_boot_setrecvtimo(so)
-	struct socket *so;
+nfs_boot_setrecvtimo(struct socket *so)
 {
 	struct timeval tv;
 
@@ -345,8 +332,7 @@
 }
 
 int
-nfs_boot_enbroadcast(so)
-	struct socket *so;
+nfs_boot_enbroadcast(struct socket *so)
 {
 	int32_t on;
 
@@ -356,10 +342,7 @@
 }
 
 int
-nfs_boot_sobind_ipport(so, port, l)
-	struct socket *so;
-	u_int16_t port;
-	struct lwp *l;
+nfs_boot_sobind_ipport(struct socket *so, uint16_t port, struct lwp *l)
 {
 	struct mbuf *m;
 	struct sockaddr_in *sin;
@@ -386,15 +369,12 @@
 #define TOTAL_TIMEOUT   30	/* seconds */
 
 int
-nfs_boot_sendrecv(so, nam, sndproc, snd, rcvproc, rcv, from_p, context, lwp)
-	struct socket *so;
-	struct mbuf *nam;
-	int (*sndproc)(struct mbuf*, void*, int);
-	struct mbuf *snd;
-	int (*rcvproc)(struct mbuf*, void*);
-	struct mbuf **rcv, **from_p;
-	void *context;
-	struct lwp *lwp;
+nfs_boot_sendrecv(struct socket *so, struct mbuf *nam,
+		int (*sndproc)(struct mbuf *, void *, int),
+		struct mbuf *snd,
+		int (*rcvproc)(struct mbuf *, void *),
+		struct mbuf **rcv, struct mbuf **from_p,
+		void *context, struct lwp *lwp)
 {
 	int error, rcvflg, timo, secs, waited;
 	struct mbuf *m, *from;
@@ -492,8 +472,7 @@
  * Install a default route to the passed IP address.
  */
 static void
-nfs_boot_defrt(gw_ip)
-	struct in_addr *gw_ip;
+nfs_boot_defrt(struct in_addr *gw_ip)
 {
 	struct sockaddr dst, gw, mask;
 	struct sockaddr_in *sin;
@@ -551,9 +530,7 @@
  * (once for root and once for swap)
  */
 static int
-nfs_boot_getfh(ndm, l)
-	struct nfs_dlmount *ndm;	/* output */
-	struct lwp *l;
+nfs_boot_getfh(struct nfs_dlmount *ndm, struct lwp *l)
 {
 	struct nfs_args *args;
 	struct sockaddr_in *sin;
@@ -645,13 +622,12 @@
  * RPC: mountd/mount
  * Given a server pathname, get an NFS file handle.
  * Also, sets sin->sin_port to the NFS service port.
+ *
+ * mdsin   mountd server address
  */
 static int
-md_mount(mdsin, path, argp, lwp)
-	struct sockaddr_in *mdsin;		/* mountd server address */
-	char *path;
-	struct nfs_args *argp;
-	struct lwp *lwp;
+md_mount(struct sockaddr_in *mdsin, char *path,
+	 struct nfs_args *argp, struct lwp *lwp)
 {
 	/* The RPC structures */
 	struct rdata {
--- a/sys/nfs/nfs_bootdhcp.c	Fri Oct 24 17:14:29 2008 +0000
+++ b/sys/nfs/nfs_bootdhcp.c	Fri Oct 24 17:17:12 2008 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bootdhcp.c,v 1.42 2008/08/06 15:01:24 plunky Exp $	*/
+/*	$NetBSD: nfs_bootdhcp.c,v 1.43 2008/10/24 17:17:12 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.42 2008/08/06 15:01:24 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_bootdhcp.c,v 1.43 2008/10/24 17:17:12 cegger Exp $");
 
 #include "opt_nfs_boot.h"
 #include "opt_tftproot.h"
@@ -217,8 +217,8 @@
 /* Convenience macro */
 #define INTOHL(ina) ((u_int32_t)ntohl((ina).s_addr))
 
-static int bootpc_call __P((struct nfs_diskless *, struct lwp *));
-static void bootp_extract __P((struct bootp *, int, struct nfs_diskless *));
+static int bootpc_call (struct nfs_diskless *, struct lwp *);
+static void bootp_extract (struct bootp *, int, struct nfs_diskless *);
 
 #ifdef	DEBUG_NFS_BOOT_DHCP
 #define DPRINTF(s)  printf s
@@ -231,9 +231,7 @@
  * Get our boot parameters using BOOTP.
  */
 int
-nfs_bootdhcp(nd, lwp)
-	struct nfs_diskless *nd;
-	struct lwp *lwp;
+nfs_bootdhcp(struct nfs_diskless *nd, struct lwp *lwp)
 {
 	struct ifnet *ifp = nd->nd_ifp;
 	int error;
@@ -289,8 +287,8 @@
 #endif
 };
 
-static int bootpset __P((struct mbuf*, void*, int));
-static int bootpcheck __P((struct mbuf*, void*));
+static int bootpset (struct mbuf*, void*, int);
+static int bootpcheck (struct mbuf*, void*);
 
 static int
 bootpset(struct mbuf *m, void *context, int waited)
@@ -306,9 +304,7 @@
 }
 
 static int
-bootpcheck(m, context)
-	struct mbuf *m;
-	void *context;
+bootpcheck(struct mbuf *m, void *context)
 {
 	struct bootp *bootp;
 	struct bootpcontext *bpc = context;
@@ -440,9 +436,7 @@
 }
 
 static int
-bootpc_call(nd, lwp)
-	struct nfs_diskless *nd;
-	struct lwp *lwp;
+bootpc_call(struct nfs_diskless *nd, struct lwp *lwp)
 {
 	struct socket *so;
 	struct ifnet *ifp = nd->nd_ifp;
@@ -669,10 +663,7 @@
 }
 
 static void
-bootp_extract(bootp, replylen, nd)
-	struct bootp *bootp;
-	int replylen;
-	struct nfs_diskless *nd;
+bootp_extract(struct bootp *bootp, int replylen, struct nfs_diskless *nd)
 {
 	struct sockaddr_in *sin;
 	struct in_addr netmask;
--- a/sys/nfs/nfs_bootparam.c	Fri Oct 24 17:14:29 2008 +0000
+++ b/sys/nfs/nfs_bootparam.c	Fri Oct 24 17:17:12 2008 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bootparam.c,v 1.32 2008/04/28 20:24:10 martin Exp $	*/
+/*	$NetBSD: nfs_bootparam.c,v 1.33 2008/10/24 17:17:12 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_bootparam.c,v 1.32 2008/04/28 20:24:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_bootparam.c,v 1.33 2008/10/24 17:17:12 cegger Exp $");
 
 #include "opt_nfs_boot.h"
 #include "opt_inet.h"
@@ -86,10 +86,10 @@
  */
 
 /* bootparam RPC */
-static int bp_whoami __P((struct sockaddr_in *bpsin,
-	struct in_addr *my_ip, struct in_addr *gw_ip, struct lwp *l));
-static int bp_getfile __P((struct sockaddr_in *bpsin, const char *key,
-	struct nfs_dlmount *ndm, struct lwp *l));
+static int bp_whoami (struct sockaddr_in *bpsin,
+	struct in_addr *my_ip, struct in_addr *gw_ip, struct lwp *l);
+static int bp_getfile (struct sockaddr_in *bpsin, const char *key,
+	struct nfs_dlmount *ndm, struct lwp *l);
 
 
 /*
@@ -103,9 +103,7 @@
  * is used for all subsequent booptaram RPCs.
  */
 int
-nfs_bootparam(nd, lwp)
-	struct nfs_diskless *nd;
-	struct lwp *lwp;
+nfs_bootparam(struct nfs_diskless *nd, struct lwp *lwp)
 {
 	struct ifnet *ifp = nd->nd_ifp;
 	struct in_addr my_ip, arps_ip, gw_ip;
@@ -284,11 +282,8 @@
  * know about us (don't want to broadcast a getport call).
  */
 static int
-bp_whoami(bpsin, my_ip, gw_ip, l)
-	struct sockaddr_in *bpsin;
-	struct in_addr *my_ip;
-	struct in_addr *gw_ip;
-	struct lwp *l;
+bp_whoami(struct sockaddr_in *bpsin, struct in_addr *my_ip,
+	struct in_addr *gw_ip, struct lwp *l)
 {
 	/* RPC structures for PMAPPROC_CALLIT */
 	struct whoami_call {
@@ -392,11 +387,8 @@
  *	server pathname
  */
 static int
-bp_getfile(bpsin, key, ndm, l)
-	struct sockaddr_in *bpsin;
-	const char *key;
-	struct nfs_dlmount *ndm;
-	struct lwp *l;
+bp_getfile(struct sockaddr_in *bpsin, const char *key,
+	struct nfs_dlmount *ndm, struct lwp *l)
 {
 	char pathname[MNAMELEN];
 	struct in_addr inaddr;
--- a/sys/nfs/nfsdiskless.h	Fri Oct 24 17:14:29 2008 +0000
+++ b/sys/nfs/nfsdiskless.h	Fri Oct 24 17:17:12 2008 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfsdiskless.h,v 1.27 2008/04/28 20:24:10 martin Exp $	*/
+/*	$NetBSD: nfsdiskless.h,v 1.28 2008/10/24 17:17:12 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -65,24 +65,24 @@
 };
 
 #ifdef _KERNEL
-int nfs_boot_init __P((struct nfs_diskless *nd, struct lwp *lwp));
-void nfs_boot_cleanup __P((struct nfs_diskless *nd, struct lwp *lwp));
-int nfs_boot_ifupdown __P((struct ifnet *, struct lwp *, int));
-int nfs_boot_setaddress __P((struct ifnet *, struct lwp *,
-			     u_int32_t, u_int32_t, u_int32_t));
-int nfs_boot_deladdress __P((struct ifnet *, struct lwp *, u_int32_t));
-void nfs_boot_flushrt __P((struct ifnet *));
-int nfs_boot_setrecvtimo __P((struct socket *));
-int nfs_boot_enbroadcast __P((struct socket *));
-int nfs_boot_sobind_ipport __P((struct socket *, u_int16_t, struct lwp *));
-int nfs_boot_sendrecv __P((struct socket *, struct mbuf *,
+int nfs_boot_init (struct nfs_diskless *nd, struct lwp *lwp);
+void nfs_boot_cleanup (struct nfs_diskless *nd, struct lwp *lwp);
+int nfs_boot_ifupdown (struct ifnet *, struct lwp *, int);
+int nfs_boot_setaddress (struct ifnet *, struct lwp *,
+			     uint32_t, uint32_t, uint32_t);
+int nfs_boot_deladdress (struct ifnet *, struct lwp *, uint32_t);
+void nfs_boot_flushrt (struct ifnet *);
+int nfs_boot_setrecvtimo (struct socket *);
+int nfs_boot_enbroadcast (struct socket *);
+int nfs_boot_sobind_ipport (struct socket *, uint16_t, struct lwp *);
+int nfs_boot_sendrecv (struct socket *, struct mbuf *,
 			   int (*)(struct mbuf*, void*, int), struct mbuf*,
 			   int (*)(struct mbuf*, void*), struct mbuf**,
-			   struct mbuf**, void*, struct lwp *));
+			   struct mbuf**, void*, struct lwp *);
 
-int nfs_bootdhcp  __P((struct nfs_diskless *, struct lwp *));
-int nfs_bootparam __P((struct nfs_diskless *, struct lwp *));
-int nfs_bootstatic __P((struct nfs_diskless *, struct lwp *));
+int nfs_bootdhcp  (struct nfs_diskless *, struct lwp *);
+int nfs_bootparam (struct nfs_diskless *, struct lwp *);
+int nfs_bootstatic (struct nfs_diskless *, struct lwp *);
 
 extern int (*nfs_bootstatic_callback)(struct nfs_diskless *);