diff options
| author | Michael Bergknoff <Michael.Bergknoff@Sun.COM> | 2010-03-31 07:21:51 -0700 |
|---|---|---|
| committer | Michael Bergknoff <Michael.Bergknoff@Sun.COM> | 2010-03-31 07:21:51 -0700 |
| commit | 7ae8c7a895927e389aea157a7b04d5eb606319fb (patch) | |
| tree | e3203611d58facf88e5ad62bbc437d43e009a3c8 /usr/src/lib/libprtdiag | |
| parent | 5bd3d01749cd2765999b591219b6bec291869744 (diff) | |
| download | illumos-joyent-7ae8c7a895927e389aea157a7b04d5eb606319fb.tar.gz | |
6932788 prtdiag -v exit status error when V_VBAT Sensor's status is warning (0volts)
Diffstat (limited to 'usr/src/lib/libprtdiag')
| -rw-r--r-- | usr/src/lib/libprtdiag/common/display_sun4v.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/usr/src/lib/libprtdiag/common/display_sun4v.c b/usr/src/lib/libprtdiag/common/display_sun4v.c index 25b5260374..0c5f2de585 100644 --- a/usr/src/lib/libprtdiag/common/display_sun4v.c +++ b/usr/src/lib/libprtdiag/common/display_sun4v.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <stdio.h> @@ -1219,6 +1218,10 @@ sun4v_env_print_sensor_callback(picl_nodehdl_t nodeh, void *args) if (sensor_status == SENSOR_OK) { return (PICL_WALK_CONTINUE); } + } else { + if (sensor_status != SENSOR_OK && all_status_ok == 1) { + all_status_ok = 0; + } } /* @@ -1388,10 +1391,8 @@ sun4v_env_print_indicator_callback(picl_nodehdl_t nodeh, void *args) sensor_status = SENSOR_UNKNOWN; } else { if (picl_get_propval_by_name(nodeh, PICL_PROP_EXPECTED, - &expected_val, sizeof (expected_val)) != + &expected_val, sizeof (expected_val)) == PICL_SUCCESS) { - sensor_status = SENSOR_UNKNOWN; - } else { if (strncmp(current_val, expected_val, sizeof (current_val)) == 0) { sensor_status = SENSOR_OK; @@ -1410,6 +1411,10 @@ sun4v_env_print_indicator_callback(picl_nodehdl_t nodeh, void *args) if (sensor_status == SENSOR_OK) { return (PICL_WALK_CONTINUE); } + } else { + if (sensor_status != SENSOR_OK && all_status_ok == 1) { + all_status_ok = 0; + } } /* @@ -1780,6 +1785,10 @@ sun4v_print_fru_status_callback(picl_nodehdl_t nodeh, void *args) } } else return (PICL_WALK_CONTINUE); + } else { + if (all_status_ok && (strcmp(status, "disabled") == 0)) { + all_status_ok = 0; + } } if (is_fru_absent(nodeh)) |
