summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@oxide.computer>2022-03-27 22:44:09 -0700
committerRobert Mustacchi <rm@fingolfin.org>2022-07-11 23:22:17 +0000
commitdb6ea8e69c35f1dac85a7e12505787c1212108b2 (patch)
tree04a1ecbedcb00614edb2a24d12d8400644839dfe
parent15f90b02bdacbf0ae47fa105944f15b6596f9748 (diff)
downloadillumos-joyent-db6ea8e69c35f1dac85a7e12505787c1212108b2.tar.gz
14594 psrinfo(1M) may fail to emit socket type
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r--usr/src/cmd/psrinfo/psrinfo.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/cmd/psrinfo/psrinfo.c b/usr/src/cmd/psrinfo/psrinfo.c
index 19c4ef41ba..69b89f10b7 100644
--- a/usr/src/cmd/psrinfo/psrinfo.c
+++ b/usr/src/cmd/psrinfo/psrinfo.c
@@ -13,6 +13,7 @@
* Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright 2019 Joyent, Inc.
+ * Copyright 2022 Oxide Computer Co.
*/
/*
@@ -285,10 +286,6 @@ print_vp(int nspec)
if (((len = strlen(vcpu->v_brand)) != 0) &&
(strncmp(vcpu->v_brand, vcpu->v_impl, len) != 0))
(void) printf("\t%s", vcpu->v_brand);
- if (strcmp(vcpu->v_socket, "Unknown") != 0)
- (void) printf("\t[ %s: %s ]", _("Socket"),
- vcpu->v_socket);
- (void) putchar('\n');
} else {
for (l2 = chip->p_cores; l2; l2 = l2->l_next) {
core = l2->l_ptr;
@@ -305,8 +302,13 @@ print_vp(int nspec)
}
if (((len = strlen(vcpu->v_brand)) != 0) &&
(strncmp(vcpu->v_brand, vcpu->v_impl, len) != 0))
- (void) printf(" %s\n", vcpu->v_brand);
+ (void) printf(" %s", vcpu->v_brand);
}
+ if (strcmp(vcpu->v_socket, "Unknown") != 0) {
+ (void) printf("\t[ %s: %s ]", _("Socket"),
+ vcpu->v_socket);
+ }
+ (void) putchar('\n');
}
}