Lines Matching defs:string
34 #include <string.h>
42 static int reparse_create_nvlist(const char *string, nvlist_t *nvl);
45 static int reparse_validate_create_nvlist(const char *string, nvlist_t *nvl);
47 /* array of characters not allowed in service type string */
89 * Parse the specified string and populate the nvlist with the svc_types
90 * and data from the 'string'. The string could be read from the reparse
97 reparse_parse(const char *string, nvlist_t *nvl)
101 if (string == NULL || nvl == NULL)
104 if ((err = reparse_validate(string)) != 0)
107 if ((err = reparse_create_nvlist(string, nvl)) != 0)
153 * make sure service type and service data are non-empty string.
175 reparse_validate(const char *string)
177 return (reparse_validate_create_nvlist(string, NULL));
184 * . Validate a reparse data string.
185 * . Validate a reparse data string and parse the data
189 reparse_validate_create_nvlist(const char *string, nvlist_t *nvl)
194 if (string == NULL)
197 if (strlen(string) >= MAXREPARSELEN)
200 if ((reparse_data = strdup(string)) == NULL)
321 reparse_create_nvlist(const char *string, nvlist_t *nvl)
326 return (reparse_validate_create_nvlist(string, nvl));