Lines Matching defs:state
511 * instance and the desired state for the enabled bit in the instance's
957 * get_inst_state() gets the state string from an instance, and returns
958 * the SCF_STATE_* constant that coincides with the instance's current state.
967 char state[MAX_SCF_STATE_STRING_SZ];
975 /* Pull the state property from the instance */
985 if (scf_value_get_astring(val, state, sizeof (state)) <= 0) {
990 if (strcmp(state, SCF_STATE_STRING_UNINIT) == 0) {
992 } else if (strcmp(state, SCF_STATE_STRING_MAINT) == 0) {
994 } else if (strcmp(state, SCF_STATE_STRING_OFFLINE) == 0) {
996 } else if (strcmp(state, SCF_STATE_STRING_DISABLED) == 0) {
998 } else if (strcmp(state, SCF_STATE_STRING_ONLINE) == 0) {
1000 } else if (strcmp(state, SCF_STATE_STRING_DEGRADED) == 0) {
1015 * present state, if it is different.
1033 * Temporarily store the present enabled state.
1607 * property containing the state of the instance,
3084 state_from_string(const char *state, size_t l)
3093 if (str_cmp(SCF_STATE_STRING_UNINIT, state, l) == 0)
3095 else if (str_cmp(SCF_STATE_STRING_MAINT, state, l) == 0)
3097 else if (str_cmp(SCF_STATE_STRING_OFFLINE, state, l) == 0)
3099 else if (str_cmp(SCF_STATE_STRING_DISABLED, state, l) == 0)
3101 else if (str_cmp(SCF_STATE_STRING_ONLINE, state, l) == 0)
3103 else if (str_cmp(SCF_STATE_STRING_DEGRADED, state, l) == 0)
3105 else if (str_cmp("all", state, l) == 0)
3113 * return the value of the macro SCF_STATE_* for the corresponding state
3115 * correspond to any valid state.
3118 smf_state_from_string(const char *state)
3120 return (state_from_string(state, 0));
3125 * Takes an int32_t representing an SMF state and returns