Mercurial > illumos > illumos-gate
changeset 5028:71f71fe9e4b9
6594328 Solaris "faulted" CPU status is not reported by PICL
author | fw157321 |
---|---|
date | Tue, 11 Sep 2007 16:36:53 -0700 |
parents | f94564d84810 |
children | ffbab30c82bd |
files | usr/src/cmd/picl/plugins/common/devtree/picldevtree.c usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c usr/src/lib/libprtdiag/common/display_sun4v.c |
diffstat | 4 files changed, 178 insertions(+), 83 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c Tue Sep 11 15:04:40 2007 -0700 +++ b/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c Tue Sep 11 16:36:53 2007 -0700 @@ -744,8 +744,8 @@ for (err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &childh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, &childh, - sizeof (picl_nodehdl_t))) { + err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, &childh, + sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) return (err); @@ -891,7 +891,7 @@ for (promp = di_prom_prop_next(ph, di_node, DI_PROM_PROP_NIL); promp != DI_PROM_PROP_NIL; - promp = di_prom_prop_next(ph, di_node, promp)) { + promp = di_prom_prop_next(ph, di_node, promp)) { pname = di_prom_prop_name(promp); @@ -1073,7 +1073,7 @@ for (di_prop = di_prop_next(di_node, DI_PROP_NIL); di_prop != DI_PROP_NIL; - di_prop = di_prop_next(di_node, di_prop)) { + di_prop = di_prop_next(di_node, di_prop)) { di_val = di_prop_name(di_prop); di_ptype = di_prop_type(di_prop); @@ -1571,7 +1571,8 @@ { int err; - if (strcmp(mach_name, "sun4u") == 0) { + if (strcmp(mach_name, "sun4u") == 0 || + strcmp(mach_name, "sun4v") == 0) { err = get_int_propval_by_name(modh, OBP_PROP_UPA_PORTID, id); if (err == PICL_SUCCESS) return (err); @@ -1890,8 +1891,8 @@ for (err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, - &nodeh, sizeof (picl_nodehdl_t))) { + err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, + &nodeh, sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) return (err); @@ -2183,14 +2184,14 @@ (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); (void) strlcat(pname, ASRTREE_CONFFILE_NAME, PATH_MAX); conf_name_asr_map = read_asr_conf_file(pname, - conf_name_asr_map); + conf_name_asr_map); } if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); (void) strlcat(pname, ASRTREE_CONFFILE_NAME, PATH_MAX); conf_name_asr_map = read_asr_conf_file(pname, - conf_name_asr_map); + conf_name_asr_map); } (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, @@ -2322,7 +2323,7 @@ for (err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &chdh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh, - sizeof (picl_nodehdl_t))) { + sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) break; err = ptree_get_propval_by_name(chdh, PICL_PROP_NAME, @@ -2481,7 +2482,7 @@ PTREE_PROPINFO_VERSION, PICL_PTYPE_CHARSTRING, PICL_READ, strlen(triple.propval) + 1, - triple.propname, NULL, NULL); + triple.propname, NULL, NULL); (void) ptree_create_and_add_prop(chdh, &propinfo, triple.propval, &proph); } @@ -2684,8 +2685,8 @@ for (err = ptree_get_propval_by_name(pcih, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, - sizeof (picl_nodehdl_t))) { + err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, + sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) return (err); @@ -2730,8 +2731,8 @@ for (err = ptree_get_propval_by_name(pcih, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, - sizeof (picl_nodehdl_t))) { + err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, + sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) return (err); @@ -3121,7 +3122,7 @@ * check if the #size-cells of the platform node is 2 */ err = ptree_get_propval_by_name(plafh, OBP_PROP_SIZE_CELLS, &pval, - sizeof (pval)); + sizeof (pval)); if (err == PICL_PROPNOTFOUND) pval = SUPPORTED_NUM_CELL_SIZE; @@ -3174,8 +3175,8 @@ * Add the size property */ (void) ptree_init_propinfo(&pinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (memsize), - PICL_PROP_SIZE, NULL, NULL); + PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (memsize), + PICL_PROP_SIZE, NULL, NULL); err = ptree_create_and_add_prop(memh, &pinfo, &memsize, NULL); return (err); } @@ -3260,6 +3261,8 @@ picldevtree_evhandler, NULL); (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, picldevtree_evhandler, NULL); + (void) ptree_register_handler(PICLEVENT_CPU_STATE_CHANGE, + picldevtree_evhandler, NULL); } /* @@ -3273,6 +3276,8 @@ picldevtree_evhandler, NULL); (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, picldevtree_evhandler, NULL); + (void) ptree_unregister_handler(PICLEVENT_CPU_STATE_CHANGE, + picldevtree_evhandler, NULL); conf_name_class_map = free_conf_entries(conf_name_class_map); } @@ -3284,6 +3289,7 @@ * * PICLEVENT_SYSEVENT_DEVICE_ADDED * PICLEVENT_SYSEVENT_DEVICE_REMOVED + * PICLEVENT_CPU_STATE_CHANGE */ /* ARGSUSED */ static void @@ -3320,6 +3326,9 @@ syslog(LOG_INFO, "picldevtree: event handler invoked ename:%s " "ptreepath:%s\n", ename, ptreepath); + if (strcmp(ename, PICLEVENT_CPU_STATE_CHANGE) == 0) { + goto done; + } if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) { di_node_t devnode; char *strp;
--- a/usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c Tue Sep 11 15:04:40 2007 -0700 +++ b/usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c Tue Sep 11 16:36:53 2007 -0700 @@ -19,13 +19,14 @@ * 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. */ #pragma ident "%Z%%M% %I% %E% SMI" #include "mdescplugin.h" +#include <limits.h> /* These 3 variable are defined and set in mdescplugin.c */ extern picl_nodehdl_t root_node; @@ -84,7 +85,7 @@ for (i = 0; i < ntlbs; i++) { if (md_get_prop_data(mdp, tlblistp[i], "type", &type, - &type_size)) { + &type_size)) { return; } @@ -116,7 +117,7 @@ } if (!(md_get_prop_val(mdp, tlblistp[i], "entries", - &int_value))) { + &int_value))) { (void) snprintf(property, sizeof (property), "%s-entries", tlb_str); add_md_prop(node, sizeof (int_value), property, @@ -138,7 +139,7 @@ for (i = 0; i < ncaches; i++) { if (md_get_prop_data(mdp, cachelistp[i], "type", &type, - &type_size)) { + &type_size)) { return; } @@ -178,7 +179,7 @@ } if (!(md_get_prop_val(mdp, cachelistp[i], "associativity", - &int_value))) { + &int_value))) { (void) snprintf(property, sizeof (property), "%s-associativity", cache_str); add_md_prop(node, sizeof (int_value), property, @@ -186,7 +187,7 @@ } if (!(md_get_prop_val(mdp, cachelistp[i], "size", - &int_value))) { + &int_value))) { (void) snprintf(property, sizeof (property), "%s-size", cache_str); add_md_prop(node, sizeof (int_value), property, @@ -194,7 +195,7 @@ } if (!(md_get_prop_val(mdp, cachelistp[i], "line-size", - &int_value))) { + &int_value))) { (void) snprintf(property, sizeof (property), "%s-line-size", cache_str); add_md_prop(node, sizeof (int_value), property, @@ -213,7 +214,8 @@ int ncpus, ncaches, ntlbs; int status; int reg_prop[SUN4V_CPU_REGSIZE], cpuid; - uint64_t int_value; + uint64_t int64_value; + int int_value; status = ptree_get_propval_by_name(node, OBP_REG, reg_prop, sizeof (reg_prop)); @@ -261,18 +263,20 @@ */ for (x = 0; x < ncpus; x++) { - if (md_get_prop_val(mdp, cpulistp[x], "id", &int_value)) { + if (md_get_prop_val(mdp, cpulistp[x], "id", &int64_value)) { continue; } - if (int_value != cpuid) + if (int64_value != cpuid) continue; - add_md_prop(node, sizeof (int_value), "cpuid", &int_value, - PICL_PTYPE_INT); + int_value = (int)(int64_value & INT32_MAX); - add_md_prop(node, sizeof (int_value), "portid", &int_value, - PICL_PTYPE_INT); + add_md_prop(node, sizeof (int_value), OBP_PROP_CPUID, + &int_value, PICL_PTYPE_INT); + + add_md_prop(node, sizeof (int_value), OBP_PROP_PORTID, + &int_value, PICL_PTYPE_INT); /* get caches for CPU */ ncaches = md_scan_dag(mdp, cpulistp[x],
--- a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c Tue Sep 11 15:04:40 2007 -0700 +++ b/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c Tue Sep 11 16:36:53 2007 -0700 @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,6 +37,7 @@ */ #include "mdescplugin.h" +#include <libnvpair.h> #pragma init(mdescplugin_register) /* place in .init section */ @@ -196,6 +197,65 @@ nvlist_free(nvlp); } +/*ARGSUSED*/ +static void +mdesc_ev_completion_handler(char *ename, void *earg, size_t size) +{ + free(earg); +} + +static void +signal_devtree(void) +{ + nvlist_t *nvl; + char *packed_nvl; + size_t nvl_size; + int status; + + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL) != 0) + return; + + /* + * Right now (Aug. 2007) snowbird is the only other platform + * which uses this event. Since that's a sun4u platform and + * this is sun4v we do not have to worry about possible confusion + * or interference between the two by grabbing this event for + * our own use here. This event is consumed by the devtree + * plug-in. The event signals the plug-in to re-run its + * cpu initialization function, which will cause it to add + * additional information to the cpu devtree nodes (particularly, + * the administrative state of the cpus.) + */ + if (nvlist_add_string(nvl, PICLEVENTARG_EVENT_NAME, + PICLEVENT_CPU_STATE_CHANGE) != 0) { + free(nvl); + return; + } + + /* + * The devtree plug-in needs to see a devfs path argument for + * any event it considers. We supply one here which is essentially + * a dummy since it is not processed by the devtree plug-in for + * this event. + */ + if (nvlist_add_string(nvl, PICLEVENTARG_DEVFS_PATH, "/cpu") != 0) { + free(nvl); + return; + } + if (nvlist_pack(nvl, &packed_nvl, &nvl_size, NV_ENCODE_NATIVE, + NULL) != 0) { + free(nvl); + return; + } + if ((status = ptree_post_event(PICLEVENT_CPU_STATE_CHANGE, + packed_nvl, nvl_size, mdesc_ev_completion_handler)) != + PICL_SUCCESS) { + free(nvl); + syslog(LOG_WARNING, + "signal_devtree: can't post cpu event: %d\n", status); + } +} + void mdescplugin_init(void) { @@ -221,6 +281,8 @@ return; } + signal_devtree(); + (void) disk_discovery(); /*
--- a/usr/src/lib/libprtdiag/common/display_sun4v.c Tue Sep 11 15:04:40 2007 -0700 +++ b/usr/src/lib/libprtdiag/common/display_sun4v.c Tue Sep 11 16:36:53 2007 -0700 @@ -708,7 +708,7 @@ log_printf(fmt, "", "", "", "CPU", "CPU", 0); log_printf("\n"); log_printf(fmt, "Location", "CPU", "Freq", - "Implementation", "Mask", 0); + "Implementation", "State", 0); log_printf("\n"); log_printf(fmt, "------------", "-----", "--------", "-------------------", "-----", 0); @@ -730,11 +730,12 @@ picl_prophdl_t rowproph; picl_propinfo_t propinfo; int *int_value; - uint64_t cpuid, mask_no; + int cpuid; char *comp_value; char *no_prop_value = " "; char freq_str[MAXSTRLEN]; char fru_name[MAXSTRLEN]; + char state[MAXSTRLEN]; /* * Get cpuid property and print it and the NAC name @@ -747,9 +748,9 @@ log_printf("%-6s", no_prop_value); } else { (void) snprintf(fru_name, sizeof (fru_name), "%s%d", - CPU_STRAND_NAC, (int)cpuid); + CPU_STRAND_NAC, cpuid); log_printf("%-13s", fru_name); - log_printf("%-6d", (int)cpuid); + log_printf("%-6d", cpuid); } } else { log_printf("%-13s", no_prop_value); @@ -789,7 +790,7 @@ comp_value = malloc(propinfo.size); if (comp_value == NULL) { log_printf("%-20s", no_prop_value, 0); - goto mask; + goto state; } status = picl_get_propval(proph, comp_value, propinfo.size); @@ -805,24 +806,24 @@ status = picl_get_propval(proph, &tblh, propinfo.size); if (status != PICL_SUCCESS) { log_printf("%-20s", no_prop_value, 0); - goto mask; + goto state; } status = picl_get_next_by_row(tblh, &rowproph); if (status != PICL_SUCCESS) { log_printf("%-20s", no_prop_value, 0); - goto mask; + goto state; } status = picl_get_propinfo(rowproph, &propinfo); if (status != PICL_SUCCESS) { log_printf("%-20s", no_prop_value, 0); - goto mask; + goto state; } comp_value = malloc(propinfo.size); if (comp_value == NULL) { log_printf("%-20s", no_prop_value, 0); - goto mask; + goto state; } status = picl_get_propval(rowproph, comp_value, propinfo.size); @@ -835,15 +836,15 @@ } else log_printf("%-20s", no_prop_value, 0); -mask: - status = picl_get_propinfo_by_name(cpuh, "mask#", &propinfo, &proph); +state: + status = picl_get_propinfo_by_name(cpuh, PICL_PROP_STATE, + &propinfo, &proph); if (status == PICL_SUCCESS) { - status = picl_get_propval(proph, &mask_no, sizeof (mask_no)); + status = picl_get_propval(proph, state, sizeof (state)); if (status != PICL_SUCCESS) { log_printf("%-9s", no_prop_value); } else { - log_printf(dgettext(TEXT_DOMAIN, " %2d.%d"), - (mask_no>> 4) & 0xf, mask_no & 0xf); + log_printf("%-9s", state); } } else log_printf("%-9s", no_prop_value); @@ -1064,12 +1065,12 @@ (void) strlcat(loc, names[i], PICL_PROPNAMELEN_MAX * PARENT_NAMES); } - log_printf("%-31s", loc); + log_printf("%-35s", loc); for (i = 0; i < PARENT_NAMES; i++) free(names[i]); free(loc); } else { - log_printf("%-31s", " "); + log_printf("%-35s", " "); } err = picl_get_propval_by_name(nodeh, PICL_PROP_LABEL, val, sizeof (val)); @@ -1239,12 +1240,12 @@ (void) strlcat(loc, names[i], PICL_PROPNAMELEN_MAX * PARENT_NAMES); } - log_printf("%-31s", loc); + log_printf("%-35s", loc); for (i = 0; i < PARENT_NAMES; i++) free(names[i]); free(loc); } else { - log_printf("%-31s", ""); + log_printf("%-35s", ""); } err = picl_get_propval_by_name(nodeh, PICL_PROP_LABEL, label, @@ -1262,7 +1263,7 @@ static void sun4v_env_print_fan_sensors() { - char *fmt = "%-30s %-14s %-10s\n"; + char *fmt = "%-34s %-14s %-10s\n"; /* * If there isn't any fan sensor node, return now. */ @@ -1281,9 +1282,11 @@ return; } } - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Sensor", "Status", 0); - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_RPM_SENSOR, PICL_PROP_SPEED, sun4v_env_print_sensor_callback); } @@ -1291,7 +1294,7 @@ static void sun4v_env_print_fan_indicators() { - char *fmt = "%-30s %-14s %-10s\n"; + char *fmt = "%-34s %-14s %-10s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_RPM_INDICATOR, (void *)PICL_PROP_CONDITION, sun4v_env_print_indicator_callback); @@ -1308,9 +1311,11 @@ return; } } - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Sensor", "Condition", 0); - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_RPM_INDICATOR, (void *)PICL_PROP_CONDITION, sun4v_env_print_indicator_callback); } @@ -1318,7 +1323,7 @@ static void sun4v_env_print_temp_sensors() { - char *fmt = "%-30s %-14s %-10s\n"; + char *fmt = "%-34s %-14s %-10s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_TEMPERATURE_SENSOR, (void *)PICL_PROP_TEMPERATURE, @@ -1336,9 +1341,11 @@ return; } } - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Sensor", "Status", 0); - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_TEMPERATURE_SENSOR, (void *)PICL_PROP_TEMPERATURE, sun4v_env_print_sensor_callback); @@ -1347,7 +1354,7 @@ static void sun4v_env_print_temp_indicators() { - char *fmt = "%-30s %-14s %-8s\n"; + char *fmt = "%-34s %-14s %-8s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_TEMPERATURE_INDICATOR, (void *)PICL_PROP_CONDITION, sun4v_env_print_indicator_callback); @@ -1364,9 +1371,11 @@ return; } } - log_printf("-------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Indicator", "Condition", 0); - log_printf("-------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_TEMPERATURE_INDICATOR, (void *)PICL_PROP_CONDITION, @@ -1376,7 +1385,7 @@ static void sun4v_env_print_current_sensors() { - char *fmt = "%-30s %-14s %-10s\n"; + char *fmt = "%-34s %-14s %-10s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_CURRENT_SENSOR, (void *)PICL_PROP_CURRENT, sun4v_env_print_sensor_callback); if (!class_node_found) @@ -1391,9 +1400,11 @@ return; } } - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Sensor", "Status", 0); - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_CURRENT_SENSOR, (void *)PICL_PROP_CURRENT, sun4v_env_print_sensor_callback); @@ -1402,7 +1413,7 @@ static void sun4v_env_print_current_indicators() { - char *fmt = "%-30s %-14s %-8s\n"; + char *fmt = "%-34s %-14s %-8s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_CURRENT_INDICATOR, (void *)PICL_PROP_CONDITION, @@ -1419,9 +1430,11 @@ return; } } - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Indicator", "Condition", 0); - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_CURRENT_INDICATOR, (void *)PICL_PROP_CONDITION, @@ -1431,7 +1444,7 @@ static void sun4v_env_print_voltage_sensors() { - char *fmt = "%-30s %-14s %-10s\n"; + char *fmt = "%-34s %-14s %-10s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_VOLTAGE_SENSOR, PICL_PROP_VOLTAGE, @@ -1448,9 +1461,11 @@ return; } } - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Sensor", "Status", 0); - log_printf("----------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_VOLTAGE_SENSOR, (void *)PICL_PROP_VOLTAGE, @@ -1460,7 +1475,7 @@ static void sun4v_env_print_voltage_indicators() { - char *fmt = "%-30s %-14s %-8s\n"; + char *fmt = "%-34s %-14s %-8s\n"; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_VOLTAGE_INDICATOR, (void *)PICL_PROP_CONDITION, @@ -1477,9 +1492,11 @@ return; } } - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "Indicator", "Condition", 0); - log_printf("-------------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_VOLTAGE_INDICATOR, (void *)PICL_PROP_CONDITION, @@ -1489,7 +1506,7 @@ static void sun4v_env_print_LEDs() { - char *fmt = "%-30s %-14s %-8s\n"; + char *fmt = "%-34s %-14s %-8s\n"; if (syserrlog == 0) return; (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_LED, @@ -1497,9 +1514,11 @@ if (!class_node_found) return; log_printf("\nLEDs:\n"); - log_printf("---------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); log_printf(fmt, "Location", "LED", "State", 0); - log_printf("---------------------------------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, PICL_CLASS_LED, (void *)PICL_PROP_STATE, sun4v_env_print_indicator_callback); } @@ -1581,7 +1600,7 @@ (void) strlcat(loc, names[i], PICL_PROPNAMELEN_MAX * PARENT_NAMES); } - log_printf("%-31s", loc); + log_printf("%-35s", loc); for (i = 0; i < PARENT_NAMES; i++) free(names[i]); free(loc); @@ -1594,7 +1613,7 @@ static void sun4v_print_fru_status() { - char *fmt = "%-30s %-9s %-8s\n"; + char *fmt = "%-34s %-9s %-8s\n"; (void) picl_walk_tree_by_class(phyplatformh, NULL, NULL, sun4v_print_fru_status_callback); if (!class_node_found) @@ -1615,7 +1634,7 @@ } } log_printf(fmt, "Location", "Name", "Status", 0); - log_printf("--------------------------------------------------\n"); + log_printf("------------------------------------------------------\n"); (void) picl_walk_tree_by_class(phyplatformh, NULL, NULL, sun4v_print_fru_status_callback); } @@ -1643,7 +1662,7 @@ if (strlen(rev) == 0) return (PICL_WALK_CONTINUE); log_printf("%-21s", label); - log_printf("%-40s", rev); + log_printf("%-35s", rev); log_printf("\n"); return (PICL_WALK_CONTINUE); } @@ -1664,7 +1683,8 @@ log_printf("============================"); log_printf("\n"); log_printf(fmt, "Name", "Version", 0); - log_printf("----------------------------\n"); + log_printf("-------------------------------------------------" + "-----------\n"); (void) picl_walk_tree_by_class(phyplatformh, NULL, NULL, sun4v_print_fw_rev_callback); }