From owner-svn-src-head@FreeBSD.ORG Thu Feb 14 01:01:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id ED06137C; Thu, 14 Feb 2013 01:01:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C941FB02; Thu, 14 Feb 2013 01:01:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1E11rYE092839; Thu, 14 Feb 2013 01:01:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1E11rNo092838; Thu, 14 Feb 2013 01:01:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302140101.r1E11rNo092838@svn.freebsd.org> From: Xin LI Date: Thu, 14 Feb 2013 01:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246778 - head/usr.sbin/nfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 01:01:54 -0000 Author: delphij Date: Thu Feb 14 01:01:53 2013 New Revision: 246778 URL: http://svnweb.freebsd.org/changeset/base/246778 Log: Use static for all functions that do not need to be exported. MFC after: 2 weeks Modified: head/usr.sbin/nfsd/nfsd.c Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Thu Feb 14 00:56:39 2013 (r246777) +++ head/usr.sbin/nfsd/nfsd.c Thu Feb 14 01:01:53 2013 (r246778) @@ -105,20 +105,20 @@ static struct option longopts[] = { { NULL, 0, NULL, 0} }; -void cleanup(int); -void child_cleanup(int); -void killchildren(void); -void nfsd_exit(int); -void nonfs(int); -void reapchild(int); -int setbindhost(struct addrinfo **ia, const char *bindhost, - struct addrinfo hints); -void start_server(int); -void unregistration(void); -void usage(void); -void open_stable(int *, int *); -void copy_stable(int, int); -void backup_stable(int); +static void cleanup(int); +static void child_cleanup(int); +static void killchildren(void); +static void nfsd_exit(int); +static void nonfs(int); +static void reapchild(int); +static int setbindhost(struct addrinfo **ia, const char *bindhost, + struct addrinfo hints); +static void start_server(int); +static void unregistration(void); +static void usage(void); +static void open_stable(int *, int *); +static void copy_stable(int, int); +static void backup_stable(int); /* * Nfs server daemon mostly just a user context for nfssvc() @@ -844,7 +844,7 @@ main(int argc, char **argv) } } -int +static int setbindhost(struct addrinfo **ai, const char *bindhost, struct addrinfo hints) { int ecode; @@ -890,20 +890,20 @@ setbindhost(struct addrinfo **ai, const return (0); } -void +static void usage(void) { (void)fprintf(stderr, "%s", getopt_usage); exit(1); } -void +static void nonfs(__unused int signo) { syslog(LOG_ERR, "missing system call: NFS not available"); } -void +static void reapchild(__unused int signo) { pid_t pid; @@ -916,7 +916,7 @@ reapchild(__unused int signo) } } -void +static void unregistration(void) { if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) || @@ -924,7 +924,7 @@ unregistration(void) syslog(LOG_ERR, "rpcb_unset failed"); } -void +static void killchildren(void) { int i; @@ -938,7 +938,7 @@ killchildren(void) /* * Cleanup master after SIGUSR1. */ -void +static void cleanup(__unused int signo) { nfsd_exit(0); @@ -947,13 +947,13 @@ cleanup(__unused int signo) /* * Cleanup child after SIGUSR1. */ -void +static void child_cleanup(__unused int signo) { exit(0); } -void +static void nfsd_exit(int status) { killchildren(); @@ -984,7 +984,7 @@ get_tuned_nfsdcount(void) return tuned_nfsdcnt; } -void +static void start_server(int master) { char principal[MAXHOSTNAMELEN + 5]; @@ -1066,7 +1066,7 @@ start_server(int master) /* * Open the stable restart file and return the file descriptor for it. */ -void +static void open_stable(int *stable_fdp, int *backup_fdp) { int stable_fd, backup_fd = -1, ret; @@ -1118,7 +1118,7 @@ open_stable(int *stable_fdp, int *backup /* * Copy the stable restart file to the backup or vice versa. */ -void +static void copy_stable(int from_fd, int to_fd) { int cnt, ret; @@ -1146,7 +1146,7 @@ copy_stable(int from_fd, int to_fd) /* * Back up the stable restart file when indicated by the kernel. */ -void +static void backup_stable(__unused int signo) {