+/*
+ * 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
#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
{ "" },
};
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)); \
allocate(dk_xfer, long);
#undef allocate
}
+ return(1);
}
fetchiostat()
stats(row, col, dn)
int row, dn;
{
- register i;
double atime, words, xtime, itime;
atime = s.dk_time[dn];
cmdiostat(cmd, args)
char *cmd, *args;
{
- int i;
if (prefix(cmd, "msps"))
msps = !msps;