X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/833d578b1c7e6789d33c926b9afd28176aa5d7e7..6d713a99954cf8f800ebf06894840cbd5c6e89ba:/usr/src/usr.bin/systat/iostat.c diff --git a/usr/src/usr.bin/systat/iostat.c b/usr/src/usr.bin/systat/iostat.c index d90d7fad87..f9b8c9bf13 100644 --- a/usr/src/usr.bin/systat/iostat.c +++ b/usr/src/usr.bin/systat/iostat.c @@ -1,6 +1,12 @@ +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + #ifndef lint -static char sccsid[] = "@(#)iostat.c 1.8 (Berkeley) %G%"; -#endif +static char sccsid[] = "@(#)iostat.c 5.3 (Berkeley) %G%"; +#endif not lint /* * iostat @@ -40,10 +46,14 @@ static struct nlist nlst[] = { #define X_CP_TIME 5 { "_cp_time" }, #ifdef vax -#define X_MBDINIT 6 +#define X_MBDINIT (X_CP_TIME+1) { "_mbdinit" }, -#define X_UBDINIT 7 +#define X_UBDINIT (X_CP_TIME+2) { "_ubdinit" }, +#endif +#ifdef tahoe +#define X_VBDINIT (X_CP_TIME+1) + { "_vbdinit" }, #endif { "" }, }; @@ -64,16 +74,16 @@ static int msps = 0; /* default ms/seek shown */ initiostat() { - register i; if (nlst[X_DK_BUSY].n_type == 0) { nlist("/vmunix", nlst); if (nlst[X_DK_BUSY].n_type == 0) { error("Disk init information isn't in namelist"); - return; + return(0); } } - dkinit(); + if (! dkinit()) + return(0); if (dk_ndrive) { #define allocate(e, t) \ s./**/e = (t *)calloc(dk_ndrive, sizeof (t)); \ @@ -84,6 +94,7 @@ initiostat() allocate(dk_xfer, long); #undef allocate } + return(1); } fetchiostat() @@ -244,7 +255,6 @@ static stats(row, col, dn) int row, dn; { - register i; double atime, words, xtime, itime; atime = s.dk_time[dn]; @@ -317,7 +327,6 @@ histogram(val, colwidth, scale) cmdiostat(cmd, args) char *cmd, *args; { - int i; if (prefix(cmd, "msps")) msps = !msps;