rename nlst to nl globally so can use vmstat's names.c; should not
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 25 Jul 1992 03:41:24 +0000 (19:41 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 25 Jul 1992 03:41:24 +0000 (19:41 -0800)
be a semantic change for any of these files

SCCS-vsn: usr.bin/systat/iostat.c 5.9
SCCS-vsn: usr.bin/systat/main.c 5.12
SCCS-vsn: usr.bin/systat/mbufs.c 5.6
SCCS-vsn: usr.bin/systat/netstat.c 5.9
SCCS-vsn: usr.bin/systat/pigs.c 5.11
SCCS-vsn: usr.bin/systat/swap.c 5.12
SCCS-vsn: usr.bin/systat/systat.h 5.8
SCCS-vsn: usr.bin/systat/vmstat.c 5.20

usr/src/usr.bin/systat/iostat.c
usr/src/usr.bin/systat/main.c
usr/src/usr.bin/systat/mbufs.c
usr/src/usr.bin/systat/netstat.c
usr/src/usr.bin/systat/pigs.c
usr/src/usr.bin/systat/swap.c
usr/src/usr.bin/systat/systat.h
usr/src/usr.bin/systat/vmstat.c

index c75be51..3551ed9 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)iostat.c   5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)iostat.c   5.9 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/param.h>
 #endif not lint
 
 #include <sys/param.h>
@@ -19,7 +19,7 @@ static char sccsid[] = "@(#)iostat.c  5.8 (Berkeley) %G%";
 #include "systat.h"
 #include "extern.h"
 
 #include "systat.h"
 #include "extern.h"
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define X_DK_BUSY      0
        { "_dk_busy" },
 #define X_DK_TIME      1
 #define X_DK_BUSY      0
        { "_dk_busy" },
 #define X_DK_TIME      1
@@ -86,12 +86,12 @@ closeiostat(w)
 int
 initiostat()
 {
 int
 initiostat()
 {
-       if (nlst[X_DK_BUSY].n_type == 0) {
-               if (kvm_nlist(kd, nlst)) {
-                       nlisterr(nlst);
+       if (nl[X_DK_BUSY].n_type == 0) {
+               if (kvm_nlist(kd, nl)) {
+                       nlisterr(nl);
                        return(0);
                }
                        return(0);
                }
-               if (nlst[X_DK_BUSY].n_type == 0) {
+               if (nl[X_DK_BUSY].n_type == 0) {
                        error("Disk init information isn't in namelist");
                        return(0);
                }
                        error("Disk init information isn't in namelist");
                        return(0);
                }
@@ -114,7 +114,7 @@ initiostat()
 void
 fetchiostat()
 {
 void
 fetchiostat()
 {
-       if (nlst[X_DK_BUSY].n_type == 0)
+       if (nl[X_DK_BUSY].n_type == 0)
                return;
        NREAD(X_DK_BUSY, &s.dk_busy, LONG);
        NREAD(X_DK_TIME, s.dk_time, dk_ndrive * LONG);
                return;
        NREAD(X_DK_BUSY, &s.dk_busy, LONG);
        NREAD(X_DK_TIME, s.dk_time, dk_ndrive * LONG);
@@ -131,7 +131,7 @@ labeliostat()
 {
        int row;
 
 {
        int row;
 
-       if (nlst[X_DK_BUSY].n_type == 0) {
+       if (nl[X_DK_BUSY].n_type == 0) {
                error("No dk_busy defined.");
                return;
        }
                error("No dk_busy defined.");
                return;
        }
@@ -216,7 +216,7 @@ showiostat()
        register int i, row, col;
        register long t;
 
        register int i, row, col;
        register long t;
 
-       if (nlst[X_DK_BUSY].n_type == 0)
+       if (nl[X_DK_BUSY].n_type == 0)
                return;
        for (i = 0; i < dk_ndrive; i++) {
 #define X(fld) t = s.fld[i]; s.fld[i] -= s1.fld[i]; s1.fld[i] = t
                return;
        for (i = 0; i < dk_ndrive; i++) {
 #define X(fld) t = s.fld[i]; s.fld[i] -= s1.fld[i]; s1.fld[i] = t
index 676dd15..86f5393 100644 (file)
@@ -12,7 +12,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.12 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -23,7 +23,7 @@ static char sccsid[] = "@(#)main.c    5.11 (Berkeley) %G%";
 #include "systat.h"
 #include "extern.h"
 
 #include "systat.h"
 #include "extern.h"
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define X_FIRST                0
 #define        X_HZ            0
        { "_hz" },
 #define X_FIRST                0
 #define        X_HZ            0
        { "_hz" },
@@ -80,11 +80,11 @@ main(argc, argv)
                error("%s", errbuf);
                exit(1);
        }
                error("%s", errbuf);
                exit(1);
        }
-       if (kvm_nlist(kd, nlst)) {
-               nlisterr(nlst);
+       if (kvm_nlist(kd, nl)) {
+               nlisterr(nl);
                exit(1);
        }
                exit(1);
        }
-       if (nlst[X_FIRST].n_type == 0) {
+       if (nl[X_FIRST].n_type == 0) {
                fprintf(stderr, "Couldn't namelist.\n");
                exit(1);
        }
                fprintf(stderr, "Couldn't namelist.\n");
                exit(1);
        }
index c0ade65..9737e9c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mbufs.c    5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)mbufs.c    5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -104,7 +104,7 @@ showmbufs()
        wmove(wnd, 1+j, 0); wclrtobot(wnd);
 }
 
        wmove(wnd, 1+j, 0); wclrtobot(wnd);
 }
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define        X_MBSTAT        0
        { "_mbstat" },
        { "" }
 #define        X_MBSTAT        0
        { "_mbstat" },
        { "" }
@@ -113,12 +113,12 @@ static struct nlist nlst[] = {
 int
 initmbufs()
 {
 int
 initmbufs()
 {
-       if (nlst[X_MBSTAT].n_type == 0) {
-               if (kvm_nlist(kd, nlst)) {
-                       nlisterr(nlst);
+       if (nl[X_MBSTAT].n_type == 0) {
+               if (kvm_nlist(kd, nl)) {
+                       nlisterr(nl);
                        return(0);
                }
                        return(0);
                }
-               if (nlst[X_MBSTAT].n_type == 0) {
+               if (nl[X_MBSTAT].n_type == 0) {
                        error("namelist on %s failed", _PATH_UNIX);
                        return(0);
                }
                        error("namelist on %s failed", _PATH_UNIX);
                        return(0);
                }
@@ -131,7 +131,7 @@ initmbufs()
 void
 fetchmbufs()
 {
 void
 fetchmbufs()
 {
-       if (nlst[X_MBSTAT].n_type == 0)
+       if (nl[X_MBSTAT].n_type == 0)
                return;
        NREAD(X_MBSTAT, mb, sizeof (*mb));
 }
                return;
        NREAD(X_MBSTAT, mb, sizeof (*mb));
 }
index a42e356..900b611 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)netstat.c  5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)netstat.c  5.9 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -109,7 +109,7 @@ closenetstat(w)
        }
 }
 
        }
 }
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define        X_TCB   0
        { "_tcb" },
 #define        X_UDB   1
 #define        X_TCB   0
        { "_tcb" },
 #define        X_UDB   1
@@ -120,11 +120,11 @@ static struct nlist nlst[] = {
 int
 initnetstat()
 {
 int
 initnetstat()
 {
-       if (kvm_nlist(kd, nlst)) {
-               nlisterr(nlst);
+       if (kvm_nlist(kd, nl)) {
+               nlisterr(nl);
                return(0);
        }
                return(0);
        }
-       if (nlst[X_TCB].n_value == 0) {
+       if (nl[X_TCB].n_value == 0) {
                error("No symbols in namelist");
                return(0);
        }
                error("No symbols in namelist");
                return(0);
        }
@@ -144,7 +144,7 @@ fetchnetstat()
        void *off;
        int istcp;
 
        void *off;
        int istcp;
 
-       if (nlst[X_TCB].n_value == 0)
+       if (nl[X_TCB].n_value == 0)
                return;
        for (p = netcb.ni_forw; p != (struct netinfo *)&netcb; p = p->ni_forw)
                p->ni_seen = 0;
                return;
        for (p = netcb.ni_forw; p != (struct netinfo *)&netcb; p = p->ni_forw)
                p->ni_seen = 0;
@@ -254,7 +254,7 @@ enter(inp, so, state, proto)
 void
 labelnetstat()
 {
 void
 labelnetstat()
 {
-       if (nlst[X_TCB].n_type == 0)
+       if (nl[X_TCB].n_type == 0)
                return;
        wmove(wnd, 0, 0); wclrtobot(wnd);
        mvwaddstr(wnd, 0, LADDR, "Local Address");
                return;
        wmove(wnd, 0, 0); wclrtobot(wnd);
        mvwaddstr(wnd, 0, LADDR, "Local Address");
index 8c9f9f5..ee882be 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)pigs.c     5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)pigs.c     5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -107,7 +107,7 @@ showpigs()
        wmove(wnd, y, 0); wclrtobot(wnd);
 }
 
        wmove(wnd, y, 0); wclrtobot(wnd);
 }
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define X_FIRST                0
 #define X_CPTIME       0
        { "_cp_time" },
 #define X_FIRST                0
 #define X_CPTIME       0
        { "_cp_time" },
@@ -124,12 +124,12 @@ initpigs()
 {
        fixpt_t ccpu;
 
 {
        fixpt_t ccpu;
 
-       if (nlst[X_FIRST].n_type == 0) {
-               if (kvm_nlist(kd, nlst)) {
-                       nlisterr(nlst);
+       if (nl[X_FIRST].n_type == 0) {
+               if (kvm_nlist(kd, nl)) {
+                       nlisterr(nl);
                        return(0);
                }
                        return(0);
                }
-               if (nlst[X_FIRST].n_type == 0) {
+               if (nl[X_FIRST].n_type == 0) {
                        error("namelist failed");
                        return(0);
                }
                        error("namelist failed");
                        return(0);
                }
@@ -154,7 +154,7 @@ fetchpigs()
        double t;
        static int lastnproc = 0;
 
        double t;
        static int lastnproc = 0;
 
-       if (nlst[X_FIRST].n_type == 0)
+       if (nl[X_FIRST].n_type == 0)
                return;
        if ((kpp = 
            kvm_getprocs(kd, KINFO_PROC_ALL, 0, &nproc)) == NULL) {
                return;
        if ((kpp = 
            kvm_getprocs(kd, KINFO_PROC_ALL, 0, &nproc)) == NULL) {
index 9c8315e..64c7a65 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)swap.c     5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)swap.c     5.12 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -175,7 +175,7 @@ dmtoindex(dm)
 #endif
 }
 
 #endif
 }
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define X_FIRST                0
 #define X_NSWAP         0
        { "_nswap" },
 #define X_FIRST                0
 #define X_NSWAP         0
        { "_nswap" },
@@ -200,12 +200,12 @@ int
 initswap()
 {
 #ifdef notdef  
 initswap()
 {
 #ifdef notdef  
-       if (nlst[X_FIRST].n_type == 0) {
-               if (kvm_nlist(kd, nlst)) {
-                       nlsterr(nlst);
+       if (nl[X_FIRST].n_type == 0) {
+               if (kvm_nlist(kd, nl)) {
+                       nlsterr(nl);
                        return(0);
                }
                        return(0);
                }
-               if (nlst[X_FIRST].n_type == 0) {
+               if (nl[X_FIRST].n_type == 0) {
                        error("namelist on %s failed", _PATH_UNIX);
                        return(0);
                }
                        error("namelist on %s failed", _PATH_UNIX);
                        return(0);
                }
@@ -232,7 +232,7 @@ void
 fetchswap()
 {
 #ifdef notdef  
 fetchswap()
 {
 #ifdef notdef  
-       if (nlst[X_FIRST].n_type == 0)
+       if (nl[X_FIRST].n_type == 0)
                return;
        /*
         * TODO - read procs
                return;
        /*
         * TODO - read procs
index 7143799..1cee3c3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.proprietary.c%
  *
  *
  * %sccs.include.proprietary.c%
  *
- *     @(#)systat.h    5.7 (Berkeley) %G%
+ *     @(#)systat.h    5.8 (Berkeley) %G%
  */
 
 #include <curses.h>
  */
 
 #include <curses.h>
@@ -28,7 +28,7 @@ struct  cmdtab {
 #define        UDP     0x2
 
 #define KREAD(addr, buf, len)  kvm_ckread((addr), (buf), (len))
 #define        UDP     0x2
 
 #define KREAD(addr, buf, len)  kvm_ckread((addr), (buf), (len))
-#define NVAL(indx)  nlst[(indx)].n_value
+#define NVAL(indx)  nl[(indx)].n_value
 #define NPTR(indx)  (void *)NVAL((indx))
 #define NREAD(indx, buf, len) kvm_ckread(NPTR((indx)), (buf), (len))
 #define LONG   (sizeof (long))
 #define NPTR(indx)  (void *)NVAL((indx))
 #define NREAD(indx, buf, len) kvm_ckread(NPTR((indx)), (buf), (len))
 #define LONG   (sizeof (long))
index fedc953..22fac2d 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)vmstat.c   5.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)vmstat.c   5.20 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -102,7 +102,7 @@ closekre(w)
 }
 
 
 }
 
 
-static struct nlist nlst[] = {
+static struct nlist nl[] = {
 #define X_CPTIME       0
        { "_cp_time" },
 #define X_CNT          1
 #define X_CPTIME       0
        { "_cp_time" },
 #define X_CNT          1
@@ -171,12 +171,12 @@ initkre()
        int i;
        static int once = 0;
 
        int i;
        static int once = 0;
 
-       if (nlst[0].n_type == 0) {
-               if (kvm_nlist(kd, nlst)) {
-                       nlisterr(nlst);
+       if (nl[0].n_type == 0) {
+               if (kvm_nlist(kd, nl)) {
+                       nlisterr(nl);
                        return(0);
                }
                        return(0);
                }
-               if (nlst[0].n_type == 0) {
+               if (nl[0].n_type == 0) {
                        error("No namelist");
                        return(0);
                }
                        error("No namelist");
                        return(0);
                }
@@ -198,12 +198,12 @@ initkre()
 #undef allocate
        }
        if (nintr == 0) {
 #undef allocate
        }
        if (nintr == 0) {
-               nintr = (nlst[X_EINTRCNT].n_value -
-                       nlst[X_INTRCNT].n_value) / sizeof (long);
+               nintr = (nl[X_EINTRCNT].n_value -
+                       nl[X_INTRCNT].n_value) / sizeof (long);
                intrloc = (long *) calloc(nintr, sizeof (long));
                intrname = (char **) calloc(nintr, sizeof (long));
                intrloc = (long *) calloc(nintr, sizeof (long));
                intrname = (char **) calloc(nintr, sizeof (long));
-               intrnamebuf = (char *) malloc(nlst[X_EINTRNAMES].n_value -
-                       nlst[X_INTRNAMES].n_value);
+               intrnamebuf = (char *) malloc(nl[X_EINTRNAMES].n_value -
+                       nl[X_INTRNAMES].n_value);
                if (intrnamebuf == 0 || intrname == 0 || intrloc == 0) {
                        error("Out of memory\n");
                        if (intrnamebuf)
                if (intrnamebuf == 0 || intrname == 0 || intrloc == 0) {
                        error("Out of memory\n");
                        if (intrnamebuf)