trivial iostat bug
Stephen Scalpone
rascal at verdix.UUCP
Wed Jun 27 16:14:48 AEST 1984
Our version of "iostat" printed a funny number for idle time, so I
changed a line and recompiled. Our C compiler's floating-point
arithmetic bugs have *not* been fixed. Diffs follow.
Sorry so boring.
Steve Scalpone
verdix!rascal
----------------------
*** iostat.c Wed Jun 20 23:00:15 1984
--- /usr/src/usr.bin/iostat.c Sun Sep 25 18:06:18 1983
***************
*** 207,213
time += s.cp_time[i];
if (time == 0.0)
time = 1.0;
! printf("%3.0f", 100.0*s.cp_time[o]/time);
}
#define steal(where, var) lseek(mf, where, 0); read(mf, &var, sizeof var);
--- 207,213 -----
time += s.cp_time[i];
if (time == 0.0)
time = 1.0;
! printf("%3.0f", 100*s.cp_time[o]/time);
}
#define steal(where, var) lseek(mf, where, 0); read(mf, &var, sizeof var);
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list