Lines Matching refs:arg
37 unsigned FAST_FUNC get_unsigned(char *arg, const char *errmsg) in get_unsigned() argument
42 if (*arg) { in get_unsigned()
43 res = strtoul(arg, &ptr, 0); in get_unsigned()
49 invarg_1_to_2(arg, errmsg); /* does not return */ in get_unsigned()
52 uint32_t FAST_FUNC get_u32(char *arg, const char *errmsg) in get_u32() argument
57 if (*arg) { in get_u32()
58 res = strtoul(arg, &ptr, 0); in get_u32()
64 invarg_1_to_2(arg, errmsg); /* does not return */ in get_u32()
67 uint16_t FAST_FUNC get_u16(char *arg, const char *errmsg) in get_u16() argument
72 if (*arg) { in get_u16()
73 res = strtoul(arg, &ptr, 0); in get_u16()
79 invarg_1_to_2(arg, errmsg); /* does not return */ in get_u16()
142 static void get_prefix_1(inet_prefix *dst, char *arg, int family) in get_prefix_1() argument
148 if (strcmp(arg, "default") == 0 in get_prefix_1()
149 || strcmp(arg, "all") == 0 in get_prefix_1()
150 || strcmp(arg, "any") == 0 in get_prefix_1()
158 slash = strchr(arg, '/'); in get_prefix_1()
162 if (get_addr_1(dst, arg, family) == 0) { in get_prefix_1()
198 bb_error_msg_and_die("an %s %s is expected rather than \"%s\"", "inet", "prefix", arg); in get_prefix_1()
201 int FAST_FUNC get_addr(inet_prefix *dst, char *arg, int family) in get_addr() argument
204 …bb_error_msg_and_die("\"%s\" may be inet %s, but it is not allowed in this context", arg, "address… in get_addr()
206 if (get_addr_1(dst, arg, family)) { in get_addr()
207 bb_error_msg_and_die("an %s %s is expected rather than \"%s\"", "inet", "address", arg); in get_addr()
212 void FAST_FUNC get_prefix(inet_prefix *dst, char *arg, int family) in get_prefix() argument
215 …bb_error_msg_and_die("\"%s\" may be inet %s, but it is not allowed in this context", arg, "prefix"… in get_prefix()
217 get_prefix_1(dst, arg, family); in get_prefix()
237 void FAST_FUNC invarg_1_to_2(const char *arg, const char *opt) in invarg_1_to_2() argument
239 bb_error_msg_and_die(bb_msg_invalid_arg_to, arg, opt); in invarg_1_to_2()
242 void FAST_FUNC duparg(const char *key, const char *arg) in duparg() argument
244 bb_error_msg_and_die("duplicate \"%s\": \"%s\" is the second value", key, arg); in duparg()
247 void FAST_FUNC duparg2(const char *key, const char *arg) in duparg2() argument
249 bb_error_msg_and_die("either \"%s\" is duplicate, or \"%s\" is garbage", key, arg); in duparg2()