summaryrefslogtreecommitdiff
path: root/usr/src/lib/libprtdiag_psr
diff options
context:
space:
mode:
authorjesusm <none@none>2007-01-23 10:32:54 -0800
committerjesusm <none@none>2007-01-23 10:32:54 -0800
commit867ad6ccd534f8cc8a833f2a852036a33af5d522 (patch)
tree7932d11db386d5a6348a57f062ecba67f8338d5a /usr/src/lib/libprtdiag_psr
parente1d65dbde5eb5874bb4134e5bc20a7b3efe93a41 (diff)
downloadillumos-joyent-867ad6ccd534f8cc8a833f2a852036a33af5d522.tar.gz
6497646 prtdiag output formats are different on ontario and erie
Diffstat (limited to 'usr/src/lib/libprtdiag_psr')
-rw-r--r--usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.c24
-rw-r--r--usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c10
2 files changed, 16 insertions, 18 deletions
diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.c b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.c
index 0c48b15736..ae6e5d6e3d 100644
--- a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.c
+++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.c
@@ -2,12 +2,11 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.open2solaris.org/os/licensing.
+ * or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -140,16 +139,15 @@ erie_pci_callback(picl_nodehdl_t pcih, void *args)
}
/* Printf Node Name */
- log_printf("%26s", name);
- if (strlen(name) > 30)
- log_printf(dgettext(TEXT_DOMAIN, "+ "));
+ if (strlen(name) > 25)
+ log_printf("%25.24s+", name);
else
- log_printf(dgettext(TEXT_DOMAIN, " "));
-
+ log_printf("%26s", name);
/* Print Card Model */
- log_printf("%-8s", model);
- if (strlen(model) > 8)
- log_printf(dgettext(TEXT_DOMAIN, "+"));
+ if (strlen(model) > 10)
+ log_printf("%10.9s+", model);
+ else
+ log_printf("%11s", model);
log_printf("\n");
/* Grab the next child under parent node and do it again */
diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c
index 969cb53696..e9984b5c16 100644
--- a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c
+++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -262,7 +262,7 @@ ontario_pci_callback(picl_nodehdl_t pcih, void *args)
/* Print Parent Path */
log_printf("%46.45s", pci_card.notes);
/* Printf Card Name */
- if (strlen(pci_card.name) > 24)
+ if (strlen(pci_card.name) > 25)
log_printf("%25.24s+", pci_card.name);
else
log_printf("%26s", pci_card.name);
@@ -270,7 +270,7 @@ ontario_pci_callback(picl_nodehdl_t pcih, void *args)
if (strlen(pci_card.model) > 10)
log_printf("%10.9s+", pci_card.model);
else
- log_printf("%10s", pci_card.model);
+ log_printf("%11s", pci_card.model);
log_printf("\n");
err = picl_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh,
@@ -288,7 +288,7 @@ void
sun4v_display_pci(picl_nodehdl_t plafh)
{
char platbuf[MAXSTRLEN];
- char *fmt = "%-11s %-5s %-4s %-45s %-25s %-8s";
+ char *fmt = "%-11s %-5s %-4s %-45s %-25s %-10s";
static int banner = FALSE; /* Have we printed the column headings? */
if (banner == FALSE) {
@@ -305,7 +305,7 @@ sun4v_display_pci(picl_nodehdl_t plafh)
log_printf("\n");
log_printf(fmt, "-----------", "-----", "----",
"---------------------------------------------",
- "-------------------------", "---------", 0);
+ "-------------------------", "----------", 0);
log_printf("\n");
banner = TRUE;
}