diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-29 17:52:18 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-29 17:52:18 +0800 |
commit | 408c58ec3136251732b1684bc506d7f314c47f5e (patch) | |
tree | efb33eb83183575588b1bacf05ae6509d87967cf | |
parent | f54197b0ef9cfb15ed9d7201d14639e2a7afc9df (diff) | |
download | pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar.gz pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar.bz2 pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar.lz pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar.xz pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.tar.zst pttbbs-408c58ec3136251732b1684bc506d7f314c47f5e.zip |
reprint header when SIGINT. discard first data
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@746 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/util/diskstat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pttbbs/util/diskstat.c b/pttbbs/util/diskstat.c index 0eef081b..f4146026 100644 --- a/pttbbs/util/diskstat.c +++ b/pttbbs/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); |