diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c index 9e846db34b92..ac13b768e118 100644 --- a/usr.bin/systat/devs.c +++ b/usr.bin/systat/devs.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: devs.c,v 1.1 1998/09/15 08:16:40 gibbs Exp $ + * $Id: devs.c,v 1.2 1998/09/20 00:11:23 ken Exp $ */ /* * Some code and ideas taken from the old disks.c. @@ -70,8 +70,12 @@ #include #include +#include +#include +#include #include "systat.h" #include "extern.h" +#include "devs.h" typedef enum { DS_MATCHTYPE_NONE, @@ -190,7 +194,6 @@ dsmatchselect(char *args, devstat_select_mode select_mode, int maxshowdevs, { char **tempstr; char *tstr[100]; - char *err_str; int num_args = 0; register int i; int retval = 0; diff --git a/usr.bin/systat/devs.h b/usr.bin/systat/devs.h new file mode 100644 index 000000000000..e38ed3837f1a --- /dev/null +++ b/usr.bin/systat/devs.h @@ -0,0 +1,2 @@ +int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *); +int dscmd(char *, char *, int, struct statinfo *); diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index 5e6112cfd3c0..21d4424e151f 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: iostat.c,v 1.6 1998/09/15 08:16:40 gibbs Exp $ */ /* * Copyright (c) 1980, 1992, 1993 @@ -73,8 +73,10 @@ static char sccsid[] = "@(#)iostat.c 8.1 (Berkeley) 6/6/93"; #include #include #include +#include #include "systat.h" #include "extern.h" +#include "devs.h" static struct nlist namelist[] = { #define X_CP_TIME 0 @@ -103,7 +105,6 @@ static int barlabels __P((int)); static void histogram __P((long double, int, double)); static int numlabels __P((int)); static int devstats __P((int, int, int)); -static int stats __P((int, int, int)); static void stat1 __P((int, int)); WINDOW * diff --git a/usr.bin/systat/ip.c b/usr.bin/systat/ip.c index ff87721df70c..4501af17791f 100644 --- a/usr.bin/systat/ip.c +++ b/usr.bin/systat/ip.c @@ -38,7 +38,7 @@ static const char rcsid[] = "Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp"; */ static const char rcsid[] = - "$Id: icmp.c,v 1.1 1997/09/24 02:43:39 wollman Exp $"; + "$Id: ip.c,v 1.1 1997/09/25 00:37:32 wollman Exp $"; #endif /* not lint */ #include @@ -143,7 +143,7 @@ static void domode(struct stat *ret) { const struct stat *sub; - int i, divisor = 1; + int divisor = 1; switch(currentmode) { case display_RATE: @@ -203,7 +203,6 @@ showip(void) { struct stat stats; u_long totalout; - int i; domode(&stats); totalout = stats.i.ips_forward + stats.i.ips_localout; diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index 8d6cdbafd828..44310948040e 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -42,7 +42,7 @@ static char copyright[] = static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: main.c,v 1.8 1998/06/09 04:17:19 imp Exp $"; + "$Id: main.c,v 1.9 1998/07/06 22:07:58 bde Exp $"; #endif /* not lint */ #include @@ -52,6 +52,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include "systat.h" #include "extern.h" @@ -157,6 +159,8 @@ main(argc, argv) crmode(); keyboard(); /*NOTREACHED*/ + + return EXIT_SUCCESS; } void diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c index dc27c5fee27e..389e143e9662 100644 --- a/usr.bin/systat/mbufs.c +++ b/usr.bin/systat/mbufs.c @@ -34,7 +34,7 @@ #ifndef lint static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93"; static const char rcsid[] = - "$Id: mbufs.c,v 1.6 1997/09/24 02:43:40 wollman Exp $"; + "$Id: mbufs.c,v 1.7 1998/06/09 04:17:21 imp Exp $"; #endif /* not lint */ #include @@ -136,7 +136,7 @@ showmbufs() if (mb->m_mbufs) { mvwprintw(wnd, 1+j, 0, "%-10.10s", "free"); if (mb->m_mbufs > 60) { - snprintf(buf, sizeof(buf), " %d", mb->m_mbufs); + snprintf(buf, sizeof(buf), " %ld", mb->m_mbufs); mb->m_mbufs = 60; while (mb->m_mbufs--) waddch(wnd, 'X'); diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c index 8cc3519d8fe3..227f210711e5 100644 --- a/usr.bin/systat/netstat.c +++ b/usr.bin/systat/netstat.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id: netstat.c,v 1.9 1998/06/09 04:17:23 imp Exp $"; + "$Id: netstat.c,v 1.10 1998/06/12 14:15:24 peter Exp $"; #endif /* not lint */ /* @@ -167,7 +167,7 @@ initnetstat() void fetchnetstat() { - register struct inpcb *prev, *next; + register struct inpcb *next; register struct netinfo *p; struct inpcbhead head; struct inpcb inpcb; diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c index 33b56edddcc4..7d661c2960cd 100644 --- a/usr.bin/systat/swap.c +++ b/usr.bin/systat/swap.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95"; #endif static const char rcsid[] = - "$Id: swap.c,v 1.5 1997/07/06 04:37:22 bde Exp $"; + "$Id: swap.c,v 1.6 1998/06/09 04:17:27 imp Exp $"; #endif /* not lint */ /* @@ -55,6 +55,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include "systat.h" #include "extern.h" @@ -75,7 +77,7 @@ struct nlist syms[] = { #define VM_NSWDEV 3 { "_dmmax" }, /* maximum size of a swap block */ #define VM_DMMAX 4 - 0 + { 0 } }; static int nswap, nswdev, dmmax; @@ -118,6 +120,7 @@ closeswap(w) * Kevin Lahey . */ +int initswap() { int i; @@ -228,7 +231,7 @@ labelswap() void showswap() { - int col, row, div, i, j, k, avail, npfree, used, xsize, xfree; + int col, div, i, j, k, avail, npfree, used, xsize, xfree; div = blocksize / 512; avail = npfree = 0; diff --git a/usr.bin/systat/tcp.c b/usr.bin/systat/tcp.c index 9a9bbccefee9..e0edbe1c199a 100644 --- a/usr.bin/systat/tcp.c +++ b/usr.bin/systat/tcp.c @@ -38,7 +38,7 @@ static const char rcsid[] = "Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp"; */ static const char rcsid[] = - "$Id: icmp.c,v 1.1 1997/09/24 02:43:39 wollman Exp $"; + "$Id: tcp.c,v 1.1 1997/09/27 00:44:55 wollman Exp $"; #endif /* not lint */ #include @@ -140,7 +140,7 @@ static void domode(struct tcpstat *ret) { const struct tcpstat *sub; - int i, divisor = 1; + int divisor = 1; switch(currentmode) { case display_RATE: diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index cca378d8d6db..fe31fba4a5b5 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif static const char rcsid[] = - "$Id: vmstat.c,v 1.27 1998/09/15 08:16:40 gibbs Exp $"; + "$Id: vmstat.c,v 1.28 1998/10/05 04:04:27 ken Exp $"; #endif /* not lint */ /* @@ -69,6 +69,7 @@ static const char rcsid[] = #include #include "systat.h" #include "extern.h" +#include "devs.h" static struct Info { long time[CPUSTATES]; @@ -198,7 +199,6 @@ initkre() { char *intrnamebuf, *cp; int i; - static int once = 0; if (namelist[0].n_type == 0) { if (kvm_nlist(kd, namelist)) { @@ -744,7 +744,6 @@ copyinfo(from, to) register struct Info *from, *to; { long *intrcnt; - struct devinfo tmp_dinfo; /* * time, wds, seek, and xfer are malloc'd so we have to