Lines Matching refs:state

108  * The I2C bus is noisy, and the state may be incorrectly reported as
109 * having changed. When the state changes, we attempt to confirm by
110 * retrying. If any retries indicate that the state has not changed, we
111 * assume the state change(s) were incorrect and the state has not changed.
380 char state[PSVC_MAX_STR_LEN];
409 strlcpy(state, PSVC_ERROR, sizeof (state));
414 strlcpy(state, PSVC_OK, sizeof (state));
424 status = psvc_set_attr(hdlp, fan_id, PSVC_STATE_ATTR, state);
428 /* Get state and previous state */
429 status = psvc_get_attr(hdlp, fan_id, PSVC_STATE_ATTR, state);
437 if (strcmp(state, PSVC_OK) != 0) {
441 if (strcmp(state, prev_state) != 0) {
465 char state[PSVC_MAX_STR_LEN];
499 err = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state);
508 * (we only do this if there is a change of state in order
511 if (strcmp(state, prev_state) != 0) {
687 char state[PSVC_MAX_STR_LEN];
694 &state);
702 * presence state of the child device if it was not there when the system
858 * - If we see a "bad" state we will report an error.
884 char state[PSVC_MAX_STR_LEN];
890 /* Logical state id */
895 * ac_power_check updates the Power Supply state with "NO AC POWER" if
903 * After running ac_power_check we now need to get the current state
904 * of the PS. If the power supply state is "NO AC POWER" then we do
907 status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state);
911 if (strcmp(state, "NO AC POWER") == 0)
925 PSVC_SWITCH_STATE_ATTR, state);
930 (strcmp(previous_state, state)));
934 * If there is a change of state (current state differs from
935 * previous state, then assign the error values.
937 if (strcmp(previous_state, state) != 0) {
938 if (strcmp(state, PSVC_SWITCH_OFF) == 0) {
939 strlcpy(state, PSVC_ERROR, sizeof (state));
947 strlcpy(state, PSVC_OK, sizeof (state));
951 status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state);
982 PSVC_SWITCH_STATE_ATTR, state);
987 (strcmp(state, PSVC_SWITCH_ON) == 0));
989 if (strcmp(state, PSVC_SWITCH_ON) == 0) {
1020 PSVC_STATE_ATTR, state);
1060 if (strcmp(state, PSVC_OK) != 0) {
1096 * the switch state for the PSx_AC_IN_SENSOR. If the switch is OFF the cord is
1125 * state switch ID. It check to see if the power cord has been removed from or
1126 * inserted to the power supply. It then updates the PS state accordingly.
1134 char state[PSVC_MAX_STR_LEN];
1137 status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state);
1144 * call to get the state fails.
1162 if ((unplugged) && (strcmp(state, "NO AC POWER") != 0)) {
1163 /* set id's state to "NO AC POWER" */
1169 * Set this state so that the FSP Fault LED lights
1199 if ((!unplugged) && (strcmp(state, "NO AC POWER") == 0)) {
1200 /* Default the state to "OK" */
1323 char state[PSVC_MAX_STR_LEN];
1338 err = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state);
1341 if (strcmp(state, PSVC_OK) == 0 || strcmp(state, "") == 0) { /* OK */
1564 char state[PSVC_MAX_STR_LEN];
1580 status = psvc_get_attr(hdlp, sensor_id, PSVC_SWITCH_STATE_ATTR, state);
1585 if (strcmp(state, PSVC_SWITCH_ON) == 0) {
1586 strlcpy(state, PSVC_ERROR, sizeof (state));
1592 strlcpy(state, PSVC_OK, sizeof (state));
1596 status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state);
1657 char state[PSVC_MAX_STR_LEN];
1661 strlcpy(state, PSVC_OK, sizeof (state));
1663 state);