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 | a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4 (patch) | |
tree | dc61f9f059f2c17ef2cfb7e9e3ded3fecc85e3ee /util | |
parent | 47d90cd8ffa93223cda002a409148fecaa9935a2 (diff) | |
download | pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar.gz pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar.bz2 pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar.lz pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar.xz pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.tar.zst pttbbs-a2011320f6e1417cb997bb63e2cd7d5b8bfd96c4.zip |
reprint header when SIGINT. discard first data
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@746 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-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); |