Deleted Added
full compact
nfsd.c (194880) nfsd.c (201227)
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 27 unchanged lines hidden (view full) ---

36 The Regents of the University of California. All rights reserved.\n";
37#endif /* not lint */
38
39#ifndef lint
40#if 0
41static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
42#endif
43static const char rcsid[] =
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 27 unchanged lines hidden (view full) ---

36 The Regents of the University of California. All rights reserved.\n";
37#endif /* not lint */
38
39#ifndef lint
40#if 0
41static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
42#endif
43static const char rcsid[] =
44 "$FreeBSD: head/usr.sbin/nfsd/nfsd.c 194880 2009-06-24 18:42:21Z dfr $";
44 "$FreeBSD: head/usr.sbin/nfsd/nfsd.c 201227 2009-12-29 22:53:27Z ed $";
45#endif /* not lint */
46
47#include <sys/param.h>
48#include <sys/syslog.h>
49#include <sys/wait.h>
50#include <sys/mount.h>
51#include <sys/fcntl.h>
52#include <sys/linker.h>

--- 784 unchanged lines hidden (view full) ---

837 syslog(LOG_ERR, "getaddrinfo %s: %s", bindhost,
838 gai_strerror(ecode));
839 return (1);
840 }
841 return (0);
842}
843
844void
45#endif /* not lint */
46
47#include <sys/param.h>
48#include <sys/syslog.h>
49#include <sys/wait.h>
50#include <sys/mount.h>
51#include <sys/fcntl.h>
52#include <sys/linker.h>

--- 784 unchanged lines hidden (view full) ---

837 syslog(LOG_ERR, "getaddrinfo %s: %s", bindhost,
838 gai_strerror(ecode));
839 return (1);
840 }
841 return (0);
842}
843
844void
845usage()
845usage(void)
846{
847 (void)fprintf(stderr, "usage: nfsd %s\n", USAGE);
848 exit(1);
849}
850
851void
852nonfs(__unused int signo)
853{

--- 9 unchanged lines hidden (view full) ---

863 while ((pid = wait3(NULL, WNOHANG, NULL)) > 0) {
864 for (i = 0; i < nfsdcnt; i++)
865 if (pid == children[i])
866 children[i] = -1;
867 }
868}
869
870void
846{
847 (void)fprintf(stderr, "usage: nfsd %s\n", USAGE);
848 exit(1);
849}
850
851void
852nonfs(__unused int signo)
853{

--- 9 unchanged lines hidden (view full) ---

863 while ((pid = wait3(NULL, WNOHANG, NULL)) > 0) {
864 for (i = 0; i < nfsdcnt; i++)
865 if (pid == children[i])
866 children[i] = -1;
867 }
868}
869
870void
871unregistration()
871unregistration(void)
872{
873 if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) ||
874 (!rpcb_unset(NFS_PROGRAM, 3, NULL)))
875 syslog(LOG_ERR, "rpcb_unset failed");
876}
877
878void
872{
873 if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) ||
874 (!rpcb_unset(NFS_PROGRAM, 3, NULL)))
875 syslog(LOG_ERR, "rpcb_unset failed");
876}
877
878void
879killchildren()
879killchildren(void)
880{
881 int i;
882
883 for (i = 0; i < nfsdcnt; i++) {
884 if (children[i] > 0)
885 kill(children[i], SIGKILL);
886 }
887}

--- 85 unchanged lines hidden ---
880{
881 int i;
882
883 for (i = 0; i < nfsdcnt; i++) {
884 if (children[i] > 0)
885 kill(children[i], SIGKILL);
886 }
887}

--- 85 unchanged lines hidden ---