summaryrefslogtreecommitdiff
path: root/usr/src/cmd/isainfo
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2012-12-13 11:25:45 -0800
committerRobert Mustacchi <rm@joyent.com>2012-12-20 11:07:47 -0800
commiteb23829ff08a873c612ac45d191d559394b4b408 (patch)
treebb449926f653e33b328c5c9e92f33d29c1328689 /usr/src/cmd/isainfo
parent636dfb4b6ac0749387c883053011a3afb4b4893b (diff)
downloadillumos-joyent-eb23829ff08a873c612ac45d191d559394b4b408.tar.gz
3413 isainfo -v overflows 80 columns
3417 mdb disassembler confuses rdtscp for invlpg Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/cmd/isainfo')
-rw-r--r--usr/src/cmd/isainfo/isainfo.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/cmd/isainfo/isainfo.c b/usr/src/cmd/isainfo/isainfo.c
index b460ef289e..fb7ef19c97 100644
--- a/usr/src/cmd/isainfo/isainfo.c
+++ b/usr/src/cmd/isainfo/isainfo.c
@@ -23,7 +23,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ */
#include <sys/types.h>
#include <sys/systeminfo.h>
@@ -161,13 +163,13 @@ report_hwcap(int d, const char *isa)
int linecnt = 0;
for (p = strtok(buffer, " "); p; p = strtok(NULL, " ")) {
- if (linecnt == 0)
- linecnt = printf("\t");
- linecnt += printf("%s ", p);
- if (linecnt > 68) {
+ if (linecnt + strlen(p) > 68) {
(void) printf("\n");
linecnt = 0;
}
+ if (linecnt == 0)
+ linecnt = printf("\t");
+ linecnt += printf("%s ", p);
}
if (linecnt != 0)
(void) printf("\n");