MCPcopy Create free account
hub / github.com/F-Stack/f-stack / parse_xstats_ids

Function parse_xstats_ids

dpdk/app/proc-info/main.c:228–250  ·  view source on GitHub ↗

* Parse ids value list into array */

Source from the content-addressed store, hash-verified

226 * Parse ids value list into array
227 */
228static int
229parse_xstats_ids(char *list, uint64_t *ids, int limit) {
230 int length;
231 char *token;
232 char *ctx = NULL;
233 char *endptr;
234
235 length = 0;
236 token = strtok_r(list, ",", &ctx);
237 while (token != NULL) {
238 ids[length] = strtoull(token, &endptr, 10);
239 if (*endptr != '\0')
240 return -EINVAL;
241
242 length++;
243 if (length >= limit)
244 return -E2BIG;
245
246 token = strtok_r(NULL, ",", &ctx);
247 }
248
249 return length;
250}
251
252static int
253parse_descriptor_param(char *list, struct desc_param *desc)

Callers 1

proc_info_parse_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected