diff options
Diffstat (limited to 'util/diskstat.c')
-rw-r--r-- | util/diskstat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/diskstat.c b/util/diskstat.c index 0eef081b..f4146026 100644 --- a/util/diskstat.c +++ b/util/diskstat.c @@ -596,12 +596,14 @@ phdr(int signo) } -int counttimes, busydata[1024]; +int counttimes = -1, busydata[1024]; static void printresult(int p) { int dn; - for (dn = 0; dn < num_devices; dn++) + printf("\n"); + phdr(0); + for (dn = 0; dn < maxshowdevs; dn++) printf(" %3d%% ", (busydata[dn] / counttimes)); printf("\n"); exit(0); |