svn commit: r260250 - head/usr.sbin/rpc.lockd

Xin LI delphij at FreeBSD.org
Sat Jan 4 01:08:11 UTC 2014


Author: delphij
Date: Sat Jan  4 01:08:10 2014
New Revision: 260250
URL: http://svnweb.freebsd.org/changeset/base/260250

Log:
  Use prototype.

Modified:
  head/usr.sbin/rpc.lockd/kern.c
  head/usr.sbin/rpc.lockd/lock_proc.c

Modified: head/usr.sbin/rpc.lockd/kern.c
==============================================================================
--- head/usr.sbin/rpc.lockd/kern.c	Fri Jan  3 23:36:03 2014	(r260249)
+++ head/usr.sbin/rpc.lockd/kern.c	Sat Jan  4 01:08:10 2014	(r260250)
@@ -97,8 +97,7 @@ nfslockdans(int vers, struct lockd_ans *
 #define d_args (debug_level > 2)
 
 static const char *
-from_addr(saddr)
-	struct sockaddr *saddr;
+from_addr(struct sockaddr *saddr)
 {
 	static char inet_buf[INET6_ADDRSTRLEN];
 
@@ -231,9 +230,7 @@ err:
 }
 
 void
-set_auth(cl, xucred)
-	CLIENT *cl;
-	struct xucred *xucred;
+set_auth(CLIENT *cl, struct xucred *xucred)
 {
 	int ngroups;
 

Modified: head/usr.sbin/rpc.lockd/lock_proc.c
==============================================================================
--- head/usr.sbin/rpc.lockd/lock_proc.c	Fri Jan  3 23:36:03 2014	(r260249)
+++ head/usr.sbin/rpc.lockd/lock_proc.c	Sat Jan  4 01:08:10 2014	(r260250)
@@ -76,9 +76,7 @@ static int	addrcmp(struct sockaddr *, st
  *		passed in as part of the called procedure specification
  */
 static void
-log_from_addr(fun_name, req)
-	const char *fun_name;
-	struct svc_req *req;
+log_from_addr(const char *fun_name, struct svc_req *req)
 {
 	struct sockaddr *addr;
 	char hostname_buf[NI_MAXHOST];
@@ -99,8 +97,7 @@ log_from_addr(fun_name, req)
  *  		a debug subsystem.
 */
 static void
-log_netobj(obj)
-	netobj *obj;
+log_netobj(netobj *obj)
 {
 	char objvalbuffer[(sizeof(char)*2)*MAX_NETOBJ_SZ+2];
 	char objascbuffer[sizeof(char)*MAX_NETOBJ_SZ+1];
@@ -161,9 +158,7 @@ static rpcvers_t clnt_cache_vers[CLIENT_
 static int clnt_cache_next_to_use = 0;
 
 static int
-addrcmp(sa1, sa2)
-	struct sockaddr *sa1;
-	struct sockaddr *sa2;
+addrcmp(struct sockaddr *sa1, struct sockaddr *sa2)
 {
 	int len;
 	void *p1, *p2;
@@ -190,9 +185,7 @@ addrcmp(sa1, sa2)
 }
 
 CLIENT *
-get_client(host_addr, vers)
-	struct sockaddr *host_addr;
-	rpcvers_t vers;
+get_client(struct sockaddr *host_addr, rpcvers_t vers)
 {
 	CLIENT *client;
 	struct timeval retry_time, time_now;
@@ -327,10 +320,7 @@ get_client(host_addr, vers)
  *		without expecting a result
  */
 void
-transmit_result(opcode, result, addr)
-	int opcode;
-	nlm_res *result;
-	struct sockaddr *addr;
+transmit_result(int opcode, nlm_res *result, struct sockaddr *addr)
 {
 	static char dummy;
 	CLIENT *cli;
@@ -358,10 +348,7 @@ transmit_result(opcode, result, addr)
  *		without expecting a result
  */
 void
-transmit4_result(opcode, result, addr)
-	int opcode;
-	nlm4_res *result;
-	struct sockaddr *addr;
+transmit4_result(int opcode, nlm4_res *result, struct sockaddr *addr)
 {
 	static char dummy;
 	CLIENT *cli;
@@ -385,11 +372,8 @@ transmit4_result(opcode, result, addr)
 /*
  * converts a struct nlm_lock to struct nlm4_lock
  */
-static void nlmtonlm4(struct nlm_lock *, struct nlm4_lock *);
 static void
-nlmtonlm4(arg, arg4)
-	struct nlm_lock *arg;
-	struct nlm4_lock *arg4;
+nlmtonlm4(struct nlm_lock *arg, struct nlm4_lock *arg4)
 {
 	arg4->caller_name = arg->caller_name;
 	arg4->fh = arg->fh;
@@ -432,9 +416,7 @@ nlmtonlm4(arg, arg4)
  * Notes:
  */
 nlm_testres *
-nlm_test_1_svc(arg, rqstp)
-	nlm_testargs *arg;
-	struct svc_req *rqstp;
+nlm_test_1_svc(nlm_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm_testres res;
 	struct nlm4_lock arg4;
@@ -466,9 +448,7 @@ nlm_test_1_svc(arg, rqstp)
 }
 
 void *
-nlm_test_msg_1_svc(arg, rqstp)
-	nlm_testargs *arg;
-	struct svc_req *rqstp;
+nlm_test_msg_1_svc(nlm_testargs *arg, struct svc_req *rqstp)
 {
 	nlm_testres res;
 	static char dummy;
@@ -523,9 +503,7 @@ nlm_test_msg_1_svc(arg, rqstp)
  * Notes:	*** grace period support missing
  */
 nlm_res *
-nlm_lock_1_svc(arg, rqstp)
-	nlm_lockargs *arg;
-	struct svc_req *rqstp;
+nlm_lock_1_svc(nlm_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lockargs arg4;
@@ -547,9 +525,7 @@ nlm_lock_1_svc(arg, rqstp)
 }
 
 void *
-nlm_lock_msg_1_svc(arg, rqstp)
-	nlm_lockargs *arg;
-	struct svc_req *rqstp;
+nlm_lock_msg_1_svc(nlm_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lockargs arg4;
@@ -578,9 +554,7 @@ nlm_lock_msg_1_svc(arg, rqstp)
  * Notes:
  */
 nlm_res *
-nlm_cancel_1_svc(arg, rqstp)
-	nlm_cancargs *arg;
-	struct svc_req *rqstp;
+nlm_cancel_1_svc(nlm_cancargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lock arg4;
@@ -602,9 +576,7 @@ nlm_cancel_1_svc(arg, rqstp)
 }
 
 void *
-nlm_cancel_msg_1_svc(arg, rqstp)
-	nlm_cancargs *arg;
-	struct svc_req *rqstp;
+nlm_cancel_msg_1_svc(nlm_cancargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lock arg4;
@@ -633,9 +605,7 @@ nlm_cancel_msg_1_svc(arg, rqstp)
  *		re-try an unlock that has already succeeded.
  */
 nlm_res *
-nlm_unlock_1_svc(arg, rqstp)
-	nlm_unlockargs *arg;
-	struct svc_req *rqstp;
+nlm_unlock_1_svc(nlm_unlockargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lock arg4;
@@ -652,9 +622,7 @@ nlm_unlock_1_svc(arg, rqstp)
 }
 
 void *
-nlm_unlock_msg_1_svc(arg, rqstp)
-	nlm_unlockargs *arg;
-	struct svc_req *rqstp;
+nlm_unlock_msg_1_svc(nlm_unlockargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 	struct nlm4_lock arg4;
@@ -690,9 +658,7 @@ nlm_unlock_msg_1_svc(arg, rqstp)
  * Notes:
  */
 nlm_res *
-nlm_granted_1_svc(arg, rqstp)
-	nlm_testargs *arg;
-	struct svc_req *rqstp;
+nlm_granted_1_svc(nlm_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 
@@ -710,9 +676,7 @@ nlm_granted_1_svc(arg, rqstp)
 }
 
 void *
-nlm_granted_msg_1_svc(arg, rqstp)
-	nlm_testargs *arg;
-	struct svc_req *rqstp;
+nlm_granted_msg_1_svc(nlm_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 
@@ -734,9 +698,7 @@ nlm_granted_msg_1_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_test_res_1_svc(arg, rqstp)
-	nlm_testres *arg;
-	struct svc_req *rqstp;
+nlm_test_res_1_svc(nlm_testres *arg, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm_test_res", rqstp);
@@ -751,9 +713,7 @@ nlm_test_res_1_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_lock_res_1_svc(arg, rqstp)
-	nlm_res *arg;
-	struct svc_req *rqstp;
+nlm_lock_res_1_svc(nlm_res *arg, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm_lock_res", rqstp);
@@ -769,9 +729,7 @@ nlm_lock_res_1_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_cancel_res_1_svc(arg, rqstp)
-	nlm_res *arg __unused;
-	struct svc_req *rqstp;
+nlm_cancel_res_1_svc(nlm_res *arg __unused, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm_cancel_res", rqstp);
@@ -784,9 +742,7 @@ nlm_cancel_res_1_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_unlock_res_1_svc(arg, rqstp)
-	nlm_res *arg;
-	struct svc_req *rqstp;
+nlm_unlock_res_1_svc(nlm_res *arg, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm_unlock_res", rqstp);
@@ -802,9 +758,7 @@ nlm_unlock_res_1_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_granted_res_1_svc(arg, rqstp)
-	nlm_res *arg __unused;
-	struct svc_req *rqstp;
+nlm_granted_res_1_svc(nlm_res *arg __unused, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm_granted_res", rqstp);
@@ -827,9 +781,7 @@ nlm_granted_res_1_svc(arg, rqstp)
  *		to retry if required.
  */
 nlm_shareres *
-nlm_share_3_svc(arg, rqstp)
-	nlm_shareargs *arg;
-	struct svc_req *rqstp;
+nlm_share_3_svc(nlm_shareargs *arg, struct svc_req *rqstp)
 {
 	static nlm_shareres res;
 
@@ -849,9 +801,7 @@ nlm_share_3_svc(arg, rqstp)
  * Notes:
  */
 nlm_shareres *
-nlm_unshare_3_svc(arg, rqstp)
-	nlm_shareargs *arg;
-	struct svc_req *rqstp;
+nlm_unshare_3_svc(nlm_shareargs *arg, struct svc_req *rqstp)
 {
 	static nlm_shareres res;
 
@@ -875,9 +825,7 @@ nlm_unshare_3_svc(arg, rqstp)
  *		respond to the statd protocol.
  */
 nlm_res *
-nlm_nm_lock_3_svc(arg, rqstp)
-	nlm_lockargs *arg;
-	struct svc_req *rqstp;
+nlm_nm_lock_3_svc(nlm_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm_res res;
 
@@ -901,9 +849,7 @@ nlm_nm_lock_3_svc(arg, rqstp)
  *		using monitored locks.
  */
 void *
-nlm_free_all_3_svc(arg, rqstp)
-	nlm_notify *arg __unused;
-	struct svc_req *rqstp;
+nlm_free_all_3_svc(nlm_notify *arg __unused, struct svc_req *rqstp)
 {
 	static char dummy;
 
@@ -920,9 +866,7 @@ nlm_free_all_3_svc(arg, rqstp)
  * Notes:
  */
 nlm4_testres *
-nlm4_test_4_svc(arg, rqstp)
-	nlm4_testargs *arg;
-	struct svc_req *rqstp;
+nlm4_test_4_svc(nlm4_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_testres res;
 	struct nlm4_holder *holder;
@@ -968,9 +912,7 @@ nlm4_test_4_svc(arg, rqstp)
 }
 
 void *
-nlm4_test_msg_4_svc(arg, rqstp)
-	nlm4_testargs *arg;
-	struct svc_req *rqstp;
+nlm4_test_msg_4_svc(nlm4_testargs *arg, struct svc_req *rqstp)
 {
 	nlm4_testres res;
 	static char dummy;
@@ -1020,9 +962,7 @@ nlm4_test_msg_4_svc(arg, rqstp)
  * Notes:	*** grace period support missing
  */
 nlm4_res *
-nlm4_lock_4_svc(arg, rqstp)
-	nlm4_lockargs *arg;
-	struct svc_req *rqstp;
+nlm4_lock_4_svc(nlm4_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1056,9 +996,7 @@ nlm4_lock_4_svc(arg, rqstp)
 }
 
 void *
-nlm4_lock_msg_4_svc(arg, rqstp)
-	nlm4_lockargs *arg;
-	struct svc_req *rqstp;
+nlm4_lock_msg_4_svc(nlm4_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1079,9 +1017,7 @@ nlm4_lock_msg_4_svc(arg, rqstp)
  * Notes:
  */
 nlm4_res *
-nlm4_cancel_4_svc(arg, rqstp)
-	nlm4_cancargs *arg;
-	struct svc_req *rqstp;
+nlm4_cancel_4_svc(nlm4_cancargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1100,9 +1036,7 @@ nlm4_cancel_4_svc(arg, rqstp)
 }
 
 void *
-nlm4_cancel_msg_4_svc(arg, rqstp)
-	nlm4_cancargs *arg;
-	struct svc_req *rqstp;
+nlm4_cancel_msg_4_svc(nlm4_cancargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1128,9 +1062,7 @@ nlm4_cancel_msg_4_svc(arg, rqstp)
  *		re-try an unlock that has already succeeded.
  */
 nlm4_res *
-nlm4_unlock_4_svc(arg, rqstp)
-	nlm4_unlockargs *arg;
-	struct svc_req *rqstp;
+nlm4_unlock_4_svc(nlm4_unlockargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1144,9 +1076,7 @@ nlm4_unlock_4_svc(arg, rqstp)
 }
 
 void *
-nlm4_unlock_msg_4_svc(arg, rqstp)
-	nlm4_unlockargs *arg;
-	struct svc_req *rqstp;
+nlm4_unlock_msg_4_svc(nlm4_unlockargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1179,9 +1109,7 @@ nlm4_unlock_msg_4_svc(arg, rqstp)
  * Notes:
  */
 nlm4_res *
-nlm4_granted_4_svc(arg, rqstp)
-	nlm4_testargs *arg;
-	struct svc_req *rqstp;
+nlm4_granted_4_svc(nlm4_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1199,9 +1127,7 @@ nlm4_granted_4_svc(arg, rqstp)
 }
 
 void *
-nlm4_granted_msg_4_svc(arg, rqstp)
-	nlm4_testargs *arg;
-	struct svc_req *rqstp;
+nlm4_granted_msg_4_svc(nlm4_testargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1222,9 +1148,7 @@ nlm4_granted_msg_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm4_test_res_4_svc(arg, rqstp)
-	nlm4_testres *arg;
-	struct svc_req *rqstp;
+nlm4_test_res_4_svc(nlm4_testres *arg, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm4_test_res", rqstp);
@@ -1241,9 +1165,7 @@ nlm4_test_res_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm4_lock_res_4_svc(arg, rqstp)
-	nlm4_res *arg;
-	struct svc_req *rqstp;
+nlm4_lock_res_4_svc(nlm4_res *arg, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm4_lock_res", rqstp);
@@ -1259,9 +1181,7 @@ nlm4_lock_res_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm4_cancel_res_4_svc(arg, rqstp)
-	nlm4_res *arg __unused;
-	struct svc_req *rqstp;
+nlm4_cancel_res_4_svc(nlm4_res *arg __unused, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm4_cancel_res", rqstp);
@@ -1274,9 +1194,7 @@ nlm4_cancel_res_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm4_unlock_res_4_svc(arg, rqstp)
-	nlm4_res *arg __unused;
-	struct svc_req *rqstp;
+nlm4_unlock_res_4_svc(nlm4_res *arg __unused, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm4_unlock_res", rqstp);
@@ -1289,9 +1207,7 @@ nlm4_unlock_res_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm4_granted_res_4_svc(arg, rqstp)
-	nlm4_res *arg __unused;
-	struct svc_req *rqstp;
+nlm4_granted_res_4_svc(nlm4_res *arg __unused, struct svc_req *rqstp)
 {
 	if (debug_level)
 		log_from_addr("nlm4_granted_res", rqstp);
@@ -1314,9 +1230,7 @@ nlm4_granted_res_4_svc(arg, rqstp)
  *		to retry if required.
  */
 nlm4_shareres *
-nlm4_share_4_svc(arg, rqstp)
-	nlm4_shareargs *arg;
-	struct svc_req *rqstp;
+nlm4_share_4_svc(nlm4_shareargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_shareres res;
 
@@ -1336,9 +1250,7 @@ nlm4_share_4_svc(arg, rqstp)
  * Notes:
  */
 nlm4_shareres *
-nlm4_unshare_4_svc(arg, rqstp)
-	nlm4_shareargs *arg;
-	struct svc_req *rqstp;
+nlm4_unshare_4_svc(nlm4_shareargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_shareres res;
 
@@ -1362,9 +1274,7 @@ nlm4_unshare_4_svc(arg, rqstp)
  *		respond to the statd protocol.
  */
 nlm4_res *
-nlm4_nm_lock_4_svc(arg, rqstp)
-	nlm4_lockargs *arg;
-	struct svc_req *rqstp;
+nlm4_nm_lock_4_svc(nlm4_lockargs *arg, struct svc_req *rqstp)
 {
 	static nlm4_res res;
 
@@ -1388,9 +1298,7 @@ nlm4_nm_lock_4_svc(arg, rqstp)
  *		using monitored locks.
  */
 void *
-nlm4_free_all_4_svc(arg, rqstp)
-	struct nlm4_notify *arg __unused;
-	struct svc_req *rqstp;
+nlm4_free_all_4_svc(struct nlm4_notify *arg __unused, struct svc_req *rqstp)
 {
 	static char dummy;
 
@@ -1405,9 +1313,7 @@ nlm4_free_all_4_svc(arg, rqstp)
  * Returns:	Nothing
  */
 void *
-nlm_sm_notify_0_svc(arg, rqstp)
-	struct nlm_sm_status *arg;
-	struct svc_req *rqstp __unused;
+nlm_sm_notify_0_svc(struct nlm_sm_status *arg, struct svc_req *rqstp __unused)
 {
 	static char dummy;
 	notify(arg->mon_name, arg->state);


More information about the svn-src-all mailing list