summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-09-15 19:08:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-09-15 19:08:23 +0000
commitd501a4d11c4ddbbda2648a1b99b18b3ba5c517c9 (patch)
treef230dea09fffef22e88d638e095a0ebddc30f930
parent48a96baf09588f01ecd475330fefa34c86207442 (diff)
Remove non-standard <sys/dkstat.h> header. It has not contained anything
related to disk stastics for almost 17 years, and the remaining userland-visible defines duplicate those found in <sys/sched.h>. Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and update all users to cope with this. ok kettenis@
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c4
-rw-r--r--sbin/sysctl/sysctl.c4
-rw-r--r--sys/arch/hppa/hppa/autoconf.c3
-rw-r--r--sys/arch/hppa64/hppa64/autoconf.c3
-rw-r--r--sys/kern/kern_clock.c3
-rw-r--r--sys/kern/kern_sysctl.c5
-rw-r--r--sys/kern/tty.c3
-rw-r--r--sys/net/if_sl.c3
-rw-r--r--sys/net/ppp_tty.c3
-rw-r--r--sys/sys/dkstat.h49
-rw-r--r--sys/sys/tty.h4
-rw-r--r--usr.bin/systat/cpu.c4
-rw-r--r--usr.bin/systat/iostat.c8
-rw-r--r--usr.bin/systat/pigs.c8
-rw-r--r--usr.bin/systat/vmstat.c11
-rw-r--r--usr.bin/top/machine.c4
-rw-r--r--usr.bin/vmstat/dkstats.c4
-rw-r--r--usr.bin/vmstat/vmstat.c4
-rw-r--r--usr.sbin/apmd/apmd.c4
-rw-r--r--usr.sbin/iostat/iostat.c4
20 files changed, 40 insertions, 95 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 2601ebeb4ce..793ca385924 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.31 2014/07/08 17:19:23 deraadt Exp $ */
+/* $OpenBSD: rstat_proc.c,v 1.32 2014/09/15 19:08:19 miod Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
+#include <sys/sched.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index e7bdcdfc473..12baf31ad38 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.203 2014/08/16 21:39:16 deraadt Exp $ */
+/* $OpenBSD: sysctl.c,v 1.204 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -38,10 +38,10 @@
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <sys/malloc.h>
-#include <sys/dkstat.h>
#include <sys/uio.h>
#include <sys/tty.h>
#include <sys/namei.h>
+#include <sys/sched.h>
#include <sys/sensors.h>
#include <sys/vmmeter.h>
#include <net/route.h>
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c
index 41244c48069..13f389065fc 100644
--- a/sys/arch/hppa/hppa/autoconf.c
+++ b/sys/arch/hppa/hppa/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.60 2014/09/04 19:01:02 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.61 2014/09/15 19:08:21 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -76,7 +76,6 @@ void (*cold_hook)(int); /* see below */
* LED blinking thing
*/
#ifdef USELEDS
-#include <sys/dkstat.h>
#include <sys/kernel.h>
struct timeout heartbeat_tmo;
diff --git a/sys/arch/hppa64/hppa64/autoconf.c b/sys/arch/hppa64/hppa64/autoconf.c
index ab8e9b8d05e..23b06d05dc0 100644
--- a/sys/arch/hppa64/hppa64/autoconf.c
+++ b/sys/arch/hppa64/hppa64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.20 2014/09/04 19:01:02 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.21 2014/09/15 19:08:21 miod Exp $ */
/*
* Copyright (c) 1998-2005 Michael Shalayeff
@@ -77,7 +77,6 @@ void (*cold_hook)(int); /* see below */
* LED blinking thing
*/
#ifdef USELEDS
-#include <sys/dkstat.h>
#include <sys/kernel.h>
struct timeout heartbeat_tmo;
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 6559b1615ab..279804c9b75 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.86 2014/09/04 19:14:47 miod Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.87 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -39,7 +39,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/dkstat.h>
#include <sys/timeout.h>
#include <sys/kernel.h>
#include <sys/limits.h>
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index c6fd7617fce..433f4d05098 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.263 2014/09/04 19:14:47 miod Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.264 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -58,7 +58,6 @@
#include <sys/disk.h>
#include <sys/sysctl.h>
#include <sys/msgbuf.h>
-#include <sys/dkstat.h>
#include <sys/vmmeter.h>
#include <sys/namei.h>
#include <sys/exec.h>
@@ -74,7 +73,7 @@
#include <sys/evcount.h>
#include <sys/un.h>
#include <sys/unpcb.h>
-
+#include <sys/sched.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 8a3a41189a4..c6a64d7b7d8 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.113 2014/07/13 15:29:04 tedu Exp $ */
+/* $OpenBSD: tty.c,v 1.114 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -46,7 +46,6 @@
#undef TTYDEFCHARS
#include <sys/file.h>
#include <sys/conf.h>
-#include <sys/dkstat.h>
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/vnode.h>
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index f03725585c2..3e3e86c9b77 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.53 2014/07/22 11:06:09 mpi Exp $ */
+/* $OpenBSD: if_sl.c,v 1.54 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */
/*
@@ -64,7 +64,6 @@
#include <sys/param.h>
#include <sys/mbuf.h>
-#include <sys/dkstat.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/file.h>
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 30c3bc525bd..bb243ae4227 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppp_tty.c,v 1.28 2014/07/22 11:06:10 mpi Exp $ */
+/* $OpenBSD: ppp_tty.c,v 1.29 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: ppp_tty.c,v 1.12 1997/03/24 21:23:10 christos Exp $ */
/*
@@ -101,7 +101,6 @@
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/mbuf.h>
-#include <sys/dkstat.h>
#include <sys/socket.h>
#include <sys/timeout.h>
#include <sys/ioctl.h>
diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h
deleted file mode 100644
index fc437be0492..00000000000
--- a/sys/sys/dkstat.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD: dkstat.h,v 1.9 2014/09/04 19:14:47 miod Exp $ */
-/* $NetBSD: dkstat.h,v 1.8 1995/12/28 19:16:31 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)dkstat.h 8.2 (Berkeley) 1/21/94
- */
-
-#define CP_USER 0
-#define CP_NICE 1
-#define CP_SYS 2
-#define CP_INTR 3
-#define CP_IDLE 4
-#define CPUSTATES 5
-
-#ifdef _KERNEL
-extern int64_t tk_cancc, tk_nin, tk_nout, tk_rawcc;
-#endif
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index 6655ab0065c..0bd2f34d403 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.33 2013/12/13 19:55:12 naddy Exp $ */
+/* $OpenBSD: tty.h,v 1.34 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -247,6 +247,8 @@ extern struct ttychars ttydefaults;
/* Symbolic sleep message strings. */
extern char ttyin[], ttyout[], ttopen[], ttclos[], ttybg[], ttybuf[];
+extern int64_t tk_cancc, tk_nin, tk_nout, tk_rawcc;
+
int sysctl_tty(int *, u_int, void *, size_t *, void *, size_t);
int sysctl_pty(int *, u_int, void *, size_t *, void *, size_t);
diff --git a/usr.bin/systat/cpu.c b/usr.bin/systat/cpu.c
index 5d10bf8e50c..512a8807db9 100644
--- a/usr.bin/systat/cpu.c
+++ b/usr.bin/systat/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.2 2013/09/11 07:01:03 mpi Exp $ */
+/* $OpenBSD: cpu.c,v 1.3 2014/09/15 19:08:21 miod Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -47,7 +47,7 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
#include <stdlib.h>
diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c
index 26b1a579d86..8a4adf0106f 100644
--- a/usr.bin/systat/iostat.c
+++ b/usr.bin/systat/iostat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iostat.c,v 1.42 2013/07/09 15:37:43 beck Exp $ */
+/* $OpenBSD: iostat.c,v 1.43 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: iostat.c,v 1.5 1996/05/10 23:16:35 thorpej Exp $ */
/*
@@ -31,11 +31,11 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
#include <sys/buf.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
#include <sys/mount.h>
+#include <sys/sched.h>
+#include <sys/sysctl.h>
+#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c
index fd6ce4d2d94..e4bf4532d39 100644
--- a/usr.bin/systat/pigs.c
+++ b/usr.bin/systat/pigs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pigs.c,v 1.26 2013/06/02 06:23:17 guenther Exp $ */
+/* $OpenBSD: pigs.c,v 1.27 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: pigs.c,v 1.3 1995/04/29 05:54:50 cgd Exp $ */
/*-
@@ -35,11 +35,11 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
-#include <sys/resource.h>
-#include <sys/time.h>
#include <sys/proc.h>
+#include <sys/resource.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
+#include <sys/time.h>
#include <curses.h>
#include <math.h>
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index ddb97741684..b6646dac09e 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmstat.c,v 1.76 2014/04/08 14:04:11 mpi Exp $ */
+/* $OpenBSD: vmstat.c,v 1.77 2014/09/15 19:08:21 miod Exp $ */
/* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */
/*-
@@ -35,14 +35,13 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
#include <sys/buf.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
#include <sys/namei.h>
+#include <sys/proc.h>
+#include <sys/sched.h>
+#include <sys/stat.h>
#include <sys/sysctl.h>
+#include <sys/time.h>
#include <sys/vmmeter.h>
#include <ctype.h>
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 2d9bccba1e1..c9b13d65ed1 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.78 2014/07/04 05:58:31 guenther Exp $ */
+/* $OpenBSD: machine.c,v 1.79 2014/09/15 19:08:21 miod Exp $ */
/*-
* Copyright (c) 1994 Thorsten Lockert <tholo@sigmasoft.com>
@@ -35,9 +35,9 @@
#include <sys/types.h>
#include <sys/param.h>
-#include <sys/dkstat.h>
#include <sys/mount.h>
#include <sys/proc.h>
+#include <sys/sched.h>
#include <sys/swap.h>
#include <sys/sysctl.h>
diff --git a/usr.bin/vmstat/dkstats.c b/usr.bin/vmstat/dkstats.c
index fbc0ddce74f..6d97256b3b6 100644
--- a/usr.bin/vmstat/dkstats.c
+++ b/usr.bin/vmstat/dkstats.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkstats.c,v 1.35 2010/09/24 00:11:15 deraadt Exp $ */
+/* $OpenBSD: dkstats.c,v 1.36 2014/09/15 19:08:22 miod Exp $ */
/* $NetBSD: dkstats.c,v 1.1 1996/05/10 23:19:27 thorpej Exp $ */
/*
@@ -34,9 +34,9 @@
*/
#include <sys/param.h>
-#include <sys/dkstat.h>
#include <sys/time.h>
#include <sys/disk.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/tty.h>
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 2751bbfa668..729b83b256f 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1,5 +1,5 @@
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.132 2014/07/13 21:13:51 kettenis Exp $ */
+/* $OpenBSD: vmstat.c,v 1.133 2014/09/15 19:08:22 miod Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -33,7 +33,6 @@
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
-#include <sys/dkstat.h>
#include <sys/buf.h>
#include <sys/namei.h>
#include <sys/malloc.h>
@@ -42,6 +41,7 @@
#include <sys/sysctl.h>
#include <sys/device.h>
#include <sys/pool.h>
+#include <sys/sched.h>
#include <sys/vmmeter.h>
#include <time.h>
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 4c0a62bb9a0..53154f5b6ef 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.66 2014/08/15 03:51:40 guenther Exp $ */
+/* $OpenBSD: apmd.c,v 1.67 2014/09/15 19:08:22 miod Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -37,7 +37,7 @@
#include <sys/wait.h>
#include <sys/event.h>
#include <sys/time.h>
-#include <sys/dkstat.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <syslog.h>
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index db4304eec3f..3b4d14c9928 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iostat.c,v 1.34 2014/02/13 21:01:23 tedu Exp $ */
+/* $OpenBSD: iostat.c,v 1.35 2014/09/15 19:08:22 miod Exp $ */
/* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */
/*
@@ -62,9 +62,9 @@
* SUCH DAMAGE.
*/
-#include <sys/dkstat.h>
#include <sys/limits.h>
#include <sys/time.h>
+#include <sys/sched.h>
#include <err.h>
#include <ctype.h>