From db6ea8e69c35f1dac85a7e12505787c1212108b2 Mon Sep 17 00:00:00 2001 From: Keith M Wesolowski Date: Sun, 27 Mar 2022 22:44:09 -0700 Subject: 14594 psrinfo(1M) may fail to emit socket type Reviewed by: Robert Mustacchi Reviewed by: Garrett D'Amore Approved by: Gordon Ross --- usr/src/cmd/psrinfo/psrinfo.c | 12 +++++++----- 1 file 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'); } } -- cgit v1.2.3