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

Function get_ulong_opt

dpdk/app/test-acl/main.c:1095–1107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095static unsigned long
1096get_ulong_opt(const char *opt, const char *name, size_t min, size_t max)
1097{
1098 unsigned long val;
1099 char *end;
1100
1101 errno = 0;
1102 val = strtoul(opt, &end, 0);
1103 if (errno != 0 || end[0] != 0 || val > max || val < min)
1104 rte_exit(-EINVAL, "invalid value: \"%s\" for option: %s\n",
1105 opt, name);
1106 return val;
1107}
1108
1109static void
1110get_alg_opt(const char *opt, const char *name)

Callers 1

get_input_optsFunction · 0.85

Calls 2

strtoulFunction · 0.85
rte_exitFunction · 0.85

Tested by

no test coverage detected