summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-29 17:52:18 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-29 17:52:18 +0800
commita2011320f6e1417cb997bb63e2cd7d5b8bfd96c4 (patch)
treedc61f9f059f2c17ef2cfb7e9e3ded3fecc85e3ee /util
parent47d90cd8ffa93223cda002a409148fecaa9935a2 (diff)
downloadpttbbs-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.c6
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);