Lines Matching refs: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 */
90 * Parse the specified string and populate the nvlist with the svc_types
91 * and data from the 'string'. The string could be read from the reparse
98 reparse_parse(const char *string, nvlist_t *nvl)
102 if (string == NULL || nvl == NULL)
105 if ((err = reparse_validate(string)) != 0)
108 if ((err = reparse_create_nvlist(string, nvl)) != 0)
154 * make sure service type and service data are non-empty string.
176 reparse_validate(const char *string)
178 return (reparse_validate_create_nvlist(string, NULL));
185 * . Validate a reparse data string.
186 * . Validate a reparse data string and parse the data
190 reparse_validate_create_nvlist(const char *string, nvlist_t *nvl)
195 if (string == NULL)
198 if (strlen(string) >= MAXREPARSELEN)
201 if ((reparse_data = strdup(string)) == NULL)
322 reparse_create_nvlist(const char *string, nvlist_t *nvl)
327 return (reparse_validate_create_nvlist(string, nvl));