summaryrefslogtreecommitdiffstats
path: root/libexec/rpc.rstatd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-07-08 21:18:06 +0000
committerderaadt <deraadt@openbsd.org>2001-07-08 21:18:06 +0000
commita5553e71e1bc1361ec4be3343298f548fa8563b6 (patch)
tree214d9c813ab3114e18ff5a5132ee29aad87b0f95 /libexec/rpc.rstatd
parentcleanup and document login.conf variables (diff)
downloadwireguard-openbsd-a5553e71e1bc1361ec4be3343298f548fa8563b6.tar.xz
wireguard-openbsd-a5553e71e1bc1361ec4be3343298f548fa8563b6.zip
-Wall
Diffstat (limited to 'libexec/rpc.rstatd')
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c18
-rw-r--r--libexec/rpc.rstatd/rstatd.c8
2 files changed, 17 insertions, 9 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 73c5776bb91..e98bec52391 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $ */
+/* $OpenBSD: rstat_proc.c,v 1.15 2001/07/08 21:18:09 deraadt Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/
/*static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $";
+static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.15 2001/07/08 21:18:09 deraadt Exp $";
#endif
/*
@@ -51,7 +51,7 @@ static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp
#include <sys/socket.h>
#include <nlist.h>
#include <syslog.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/param.h>
#ifdef BSD
#include <sys/vmmeter.h>
@@ -110,7 +110,6 @@ int hz;
struct ifnet_head ifnetq; /* chain of ethernet interfaces */
int numintfs;
-int stats_service();
extern int from_inetd;
int sincelastreq = 0; /* number of alarms since last request */
@@ -123,14 +122,18 @@ union {
struct statstime s3;
} stats_all;
-void updatestat();
-static stat_is_init = 0;
-extern int errno;
+int stats_service();
+void updatestat(void);
+void setup(void);
+int havedisk(void);
+
+static int stat_is_init = 0;
#ifndef FSCALE
#define FSCALE (1 << 8)
#endif
+void
stat_init()
{
stat_is_init = 1;
@@ -331,6 +334,7 @@ updatestat()
errno = save_errno;
}
+void
setup()
{
struct ifnet ifnet;
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index 1621a79b520..2f20a8020d4 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstatd.c,v 1.5 2001/01/28 19:34:31 niklas Exp $ */
+/* $OpenBSD: rstatd.c,v 1.6 2001/07/08 21:18:10 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,13 +34,16 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rstatd.c,v 1.5 2001/01/28 19:34:31 niklas Exp $";
+static char rcsid[] = "$OpenBSD: rstatd.c,v 1.6 2001/07/08 21:18:10 deraadt Exp $";
#endif /* not lint */
+#include <sys/types.h>
+#include <sys/socket.h>
#include <stdio.h>
#include <rpc/rpc.h>
#include <signal.h>
#include <syslog.h>
+#include <stdlib.h>
#include <rpcsvc/rstat.h>
extern void rstat_service();
@@ -57,6 +60,7 @@ cleanup()
_exit(0);
}
+int
main(argc, argv)
int argc;
char *argv[];