Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat Remove extern variables and functions now dec...
details: https://anonhg.NetBSD.org/src/rev/a5fce87f42e4
branches: trunk
changeset: 499873:a5fce87f42e4
user: simonb <simonb%NetBSD.org@localhost>
date: Fri Dec 01 02:19:43 2000 +0000
description:
Remove extern variables and functions now declared in dkstats.h.
While here, remove 77 (!) unneed #includes.
diffstat:
usr.bin/systat/bufcache.c | 10 +++-------
usr.bin/systat/cmds.c | 10 +++++-----
usr.bin/systat/disks.c | 11 ++++-------
usr.bin/systat/extern.h | 7 ++-----
usr.bin/systat/fetch.c | 6 ++++--
usr.bin/systat/globalcmds.c | 5 +++--
usr.bin/systat/icmp.c | 12 +++---------
usr.bin/systat/iostat.c | 15 +++------------
usr.bin/systat/ip.c | 11 +++--------
usr.bin/systat/ip6.c | 11 +++--------
usr.bin/systat/ipsec.c | 13 +++----------
usr.bin/systat/keyboard.c | 5 ++---
usr.bin/systat/main.c | 11 +++++------
usr.bin/systat/mbufs.c | 12 +++++-------
usr.bin/systat/netcmds.c | 8 ++++----
usr.bin/systat/netstat.c | 8 +++-----
usr.bin/systat/pigs.c | 9 ++-------
usr.bin/systat/ps.c | 10 +++-------
usr.bin/systat/swap.c | 10 +++-------
usr.bin/systat/systat.h | 3 ---
usr.bin/systat/tcp.c | 13 +++----------
usr.bin/systat/vmstat.c | 21 +++------------------
22 files changed, 69 insertions(+), 152 deletions(-)
diffs (truncated from 779 to 300 lines):
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/bufcache.c
--- a/usr.bin/systat/bufcache.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/bufcache.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.9 2000/11/30 12:08:13 simonb Exp $ */
+/* $NetBSD: bufcache.c,v 1.10 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,15 +38,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bufcache.c,v 1.9 2000/11/30 12:08:13 simonb Exp $");
+__RCSID("$NetBSD: bufcache.c,v 1.10 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
#include <sys/param.h>
#include <sys/buf.h>
#include <sys/mount.h>
-#include <sys/queue.h>
#include <sys/sysctl.h>
-#include <sys/time.h>
#include <sys/vnode.h>
#include <uvm/uvm_extern.h>
@@ -55,7 +53,6 @@
#include <errno.h>
#include <kvm.h>
#include <nlist.h>
-#include <paths.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -63,7 +60,6 @@
#include "systat.h"
#include "extern.h"
-
/*
* Definitions for the buffer free lists (from sys/kern/vfs_bio.c).
*/
@@ -207,7 +203,7 @@
return(0);
}
if (namelist[X_NBUF].n_type == 0) {
- error("namelist on %s failed", _PATH_UNIX);
+ error("No namelist");
return(0);
}
}
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/cmds.c
--- a/usr.bin/systat/cmds.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/cmds.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.24 2000/09/04 12:28:12 ad Exp $ */
+/* $NetBSD: cmds.c,v 1.25 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -38,14 +38,14 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
#endif
-__RCSID("$NetBSD: cmds.c,v 1.24 2000/09/04 12:28:12 ad Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.25 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
-#include <stdlib.h>
-#include <unistd.h>
+#include <ctype.h>
#include <signal.h>
-#include <ctype.h>
#include <string.h>
+#include <unistd.h>
+
#include "systat.h"
#include "extern.h"
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/disks.c
--- a/usr.bin/systat/disks.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/disks.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.11 2000/07/05 11:03:21 ad Exp $ */
+/* $NetBSD: disks.c,v 1.12 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -38,18 +38,15 @@
#if 0
static char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: disks.c,v 1.11 2000/07/05 11:03:21 ad Exp $");
+__RCSID("$NetBSD: disks.c,v 1.12 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
-#include <sys/types.h>
-
-#include <stdio.h>
+#include <ctype.h>
#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
#include "systat.h"
#include "extern.h"
+#include "dkstats.h"
static void dkselect(char *args, int truefalse, int selections[]);
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/extern.h
--- a/usr.bin/systat/extern.h Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/extern.h Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.25 2000/10/11 14:46:18 is Exp $ */
+/* $NetBSD: extern.h,v 1.26 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,15 +46,12 @@
extern struct mode modes[];
extern struct text *xtext;
extern WINDOW *wnd;
-extern char **dr_name;
extern char c, *namp, hostname[];
extern double avenrun[3];
extern float *dk_mspw;
extern kvm_t *kd;
extern long ntext, textp;
-extern int *dk_select;
extern int CMDLINE;
-extern int dk_ndrive;
extern int hz, stathz;
extern int naptime, col;
extern int nhosts;
@@ -65,6 +62,7 @@
extern char *memf;
extern int allflag;
extern int turns;
+extern gid_t egid;
struct inpcb;
#ifdef INET6
@@ -93,7 +91,6 @@
void disks_delete(char *);
void disks_drives(char *);
void display(int);
-int dkinit(int, gid_t);
void error(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void fetchbufcache(void);
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/fetch.c
--- a/usr.bin/systat/fetch.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/fetch.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.8 2000/10/11 18:50:12 thorpej Exp $ */
+/* $NetBSD: fetch.c,v 1.9 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -38,13 +38,15 @@
#if 0
static char sccsid[] = "@(#)fetch.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: fetch.c,v 1.8 2000/10/11 18:50:12 thorpej Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.9 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
#include <sys/param.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
+
#include <string.h>
+
#include "systat.h"
#include "extern.h"
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/globalcmds.c
--- a/usr.bin/systat/globalcmds.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/globalcmds.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: globalcmds.c,v 1.8 2000/07/05 11:03:21 ad Exp $ */
+/* $NetBSD: globalcmds.c,v 1.9 2000/12/01 02:19:43 simonb Exp $ */
/*-
* Copyright (c) 1999
@@ -34,13 +34,14 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: globalcmds.c,v 1.8 2000/07/05 11:03:21 ad Exp $");
+__RCSID("$NetBSD: globalcmds.c,v 1.9 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
#include <curses.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
#include "systat.h"
#include "extern.h"
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/icmp.c
--- a/usr.bin/systat/icmp.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/icmp.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp.c,v 1.5 2000/07/05 11:03:21 ad Exp $ */
+/* $NetBSD: icmp.c,v 1.6 2000/12/01 02:19:43 simonb Exp $ */
/*
* Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -29,13 +29,10 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: icmp.c,v 1.5 2000/07/05 11:03:21 ad Exp $");
+__RCSID("$NetBSD: icmp.c,v 1.6 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/sysctl.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -43,11 +40,8 @@
#include <netinet/ip_icmp.h>
#include <netinet/icmp_var.h>
-#include <stdlib.h>
+#include <kvm.h>
#include <string.h>
-#include <paths.h>
-#include <nlist.h>
-#include <kvm.h>
#include "systat.h"
#include "extern.h"
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/iostat.c
--- a/usr.bin/systat/iostat.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/iostat.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iostat.c,v 1.16 2000/07/05 11:03:21 ad Exp $ */
+/* $NetBSD: iostat.c,v 1.17 2000/12/01 02:19:43 simonb Exp $ */
/*
* Copyright (c) 1980, 1992, 1993
@@ -38,24 +38,16 @@
#if 0
static char sccsid[] = "@(#)iostat.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: iostat.c,v 1.16 2000/07/05 11:03:21 ad Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.17 2000/12/01 02:19:43 simonb Exp $");
#endif not lint
#include <sys/param.h>
-#include <sys/sched.h>
-#include <sys/dkstat.h>
-#include <sys/buf.h>
-#include <sys/time.h>
#include <string.h>
-#include <stdlib.h>
-#include <nlist.h>
-#include <paths.h>
+
#include "systat.h"
#include "extern.h"
-
#include "dkstats.h"
-extern struct _disk cur;
static int linesperregion;
static double etime;
@@ -90,7 +82,6 @@
int
initiostat(void)
{
- extern gid_t egid;
dkinit(1, egid);
dkreadstats();
diff -r e4988334ed45 -r a5fce87f42e4 usr.bin/systat/ip.c
--- a/usr.bin/systat/ip.c Fri Dec 01 02:10:22 2000 +0000
+++ b/usr.bin/systat/ip.c Fri Dec 01 02:19:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip.c,v 1.8 2000/07/05 11:03:21 ad Exp $ */
+/* $NetBSD: ip.c,v 1.9 2000/12/01 02:19:43 simonb Exp $ */
/*
* Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -29,12 +29,10 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ip.c,v 1.8 2000/07/05 11:03:21 ad Exp $");
+__RCSID("$NetBSD: ip.c,v 1.9 2000/12/01 02:19:43 simonb Exp $");
#endif /* not lint */
Home |
Main Index |
Thread Index |
Old Index