Lines Matching defs:string
52 #include <string.h>
132 * may blindly render the string along the lines of the above examples,
920 restarter_string_to_state(char *string)
922 assert(string != NULL);
924 if (strcmp(string, SCF_STATE_STRING_NONE) == 0)
926 else if (strcmp(string, SCF_STATE_STRING_UNINIT) == 0)
928 else if (strcmp(string, SCF_STATE_STRING_MAINT) == 0)
930 else if (strcmp(string, SCF_STATE_STRING_OFFLINE) == 0)
932 else if (strcmp(string, SCF_STATE_STRING_DISABLED) == 0)
934 else if (strcmp(string, SCF_STATE_STRING_ONLINE) == 0)
936 else if (strcmp(string, SCF_STATE_STRING_DEGRADED) == 0)
944 restarter_state_to_string(restarter_instance_state_t state, char *string,
947 assert(string != NULL);
950 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_NONE, len));
952 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_UNINIT, len));
954 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_MAINT, len));
956 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_OFFLINE,
959 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_DISABLED,
962 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_ONLINE, len));
964 return ((ssize_t)strlcpy(string, SCF_STATE_STRING_DEGRADED,
967 return ((ssize_t)strlcpy(string, "unknown", len));
2090 * EINVAL the string starts with a digit, but is not a valid uid