summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/systat/devs.c7
-rw-r--r--usr.bin/systat/devs.h2
-rw-r--r--usr.bin/systat/iostat.c5
-rw-r--r--usr.bin/systat/ip.c5
-rw-r--r--usr.bin/systat/main.c6
-rw-r--r--usr.bin/systat/mbufs.c4
-rw-r--r--usr.bin/systat/netstat.c4
-rw-r--r--usr.bin/systat/swap.c9
-rw-r--r--usr.bin/systat/tcp.c4
-rw-r--r--usr.bin/systat/vmstat.c5
10 files changed, 31 insertions, 20 deletions
diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c
index 9e846db..ac13b76 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 <string.h>
#include <devstat.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <err.h>
#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 0000000..e38ed38
--- /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 5e6112c..21d4424 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 <nlist.h>
#include <paths.h>
#include <devstat.h>
+#include <err.h>
#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 ff87721..4501af1 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 <sys/param.h>
@@ -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 8d6cdba..4431094 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 <sys/param.h>
@@ -52,6 +52,8 @@ static const char rcsid[] =
#include <nlist.h>
#include <signal.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#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 dc27c5f..389e143 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 <sys/param.h>
@@ -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 8cc3519..227f210 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 33b56ed..7d661c2 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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
+#include <err.h>
#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 <kml@rokkaku.atl.ga.us>.
*/
+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 9a9bbcc..e0edbe1 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 <sys/param.h>
@@ -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 cca378d..fe31fba 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 <devstat.h>
#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
OpenPOWER on IntegriCloud