diff options
author | markm <markm@FreeBSD.org> | 2001-12-01 17:41:37 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-12-01 17:41:37 +0000 |
commit | 65ffba233bc282ad6bbf25ed229b72457e6750de (patch) | |
tree | 2159e8fb8b3a82bc69b1cf318b9db1cd30ce476e /usr.bin/systat | |
parent | 4a974575ba68d19e3e1da3fbf1341ca934ea968d (diff) | |
download | FreeBSD-src-65ffba233bc282ad6bbf25ed229b72457e6750de.zip FreeBSD-src-65ffba233bc282ad6bbf25ed229b72457e6750de.tar.gz |
Remove the 'irq' string from the irqN part of the "interrupts" display.
This allows us to see the irq number when device names ate too long.
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/vmstat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index d45e2b8..315723f 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -394,8 +394,9 @@ showkre() { float f1, f2; int psiz, inttotal; - int i, l, c; + int i, j, k, l, c; static int failcnt = 0; + char intrbuffer[10]; etime = 0; for(i = 0; i < CPUSTATES; i++) { @@ -427,8 +428,15 @@ showkre() if (nextintsrow == LINES) continue; intrloc[i] = nextintsrow++; + k = 0; + for (j = 0; j < sizeof(intrbuffer); j++) { + if (strncmp(&intrname[i][j], "irq", 3) == 0) + j += 3; + intrbuffer[k++] = intrname[i][j]; + } + intrbuffer[k] = '\0'; mvprintw(intrloc[i], INTSCOL + 9, "%-10.10s", - intrname[i]); + intrbuffer); } X(intrcnt); l = (int)((float)s.intrcnt[i]/etime + 0.5); |