projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added depend label
[unix-history]
/
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
d90d7fa
..
f9b8c9b
100644
(file)
--- 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
#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
/*
* iostat
@@
-40,10
+46,14
@@
static struct nlist nlst[] = {
#define X_CP_TIME 5
{ "_cp_time" },
#ifdef vax
#define X_CP_TIME 5
{ "_cp_time" },
#ifdef vax
-#define X_MBDINIT
6
+#define X_MBDINIT
(X_CP_TIME+1)
{ "_mbdinit" },
{ "_mbdinit" },
-#define X_UBDINIT
7
+#define X_UBDINIT
(X_CP_TIME+2)
{ "_ubdinit" },
{ "_ubdinit" },
+#endif
+#ifdef tahoe
+#define X_VBDINIT (X_CP_TIME+1)
+ { "_vbdinit" },
#endif
{ "" },
};
#endif
{ "" },
};
@@
-64,16
+74,16
@@
static int msps = 0; /* default ms/seek shown */
initiostat()
{
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");
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)); \
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
}
allocate(dk_xfer, long);
#undef allocate
}
+ return(1);
}
fetchiostat()
}
fetchiostat()
@@
-244,7
+255,6
@@
static
stats(row, col, dn)
int row, dn;
{
stats(row, col, dn)
int row, dn;
{
- register i;
double atime, words, xtime, itime;
atime = s.dk_time[dn];
double atime, words, xtime, itime;
atime = s.dk_time[dn];
@@
-317,7
+327,6
@@
histogram(val, colwidth, scale)
cmdiostat(cmd, args)
char *cmd, *args;
{
cmdiostat(cmd, args)
char *cmd, *args;
{
- int i;
if (prefix(cmd, "msps"))
msps = !msps;
if (prefix(cmd, "msps"))
msps = !msps;