From: Jan Engelhardt Date: Tue, 24 May 2011 00:03:00 +0000 (+0200) Subject: libxtables: more detailed error message on multi-int parsing X-Git-Tag: v1.4.11~1^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e35b7d435c5bc1b3641f76a6601a55d32d63ac8;p=thirdparty%2Fiptables.git libxtables: more detailed error message on multi-int parsing Now shows where exactly the error is. Signed-off-by: Jan Engelhardt --- diff --git a/xtoptions.c b/xtoptions.c index ec2269b2..9884b7df 100644 --- a/xtoptions.c +++ b/xtoptions.c @@ -206,13 +206,14 @@ static void xtopt_parse_mint(struct xt_option_call *cb) cb->ext_name, entry->name, maxiter); if (!xtables_strtoui(arg, &end, &value, 0, UINT32_MAX)) xt_params->exit_err(PARAMETER_PROBLEM, - "%s: bad value for option \"--%s\", " - "or out of range (0-%u).\n", - cb->ext_name, entry->name, UINT32_MAX); + "%s: bad value for option \"--%s\" near " + "\"%s\", or out of range (0-%u).\n", + cb->ext_name, entry->name, arg, UINT32_MAX); if (*end != '\0' && *end != sep) xt_params->exit_err(PARAMETER_PROBLEM, "%s: Argument to \"--%s\" has unexpected " - "characters.\n", cb->ext_name, entry->name); + "characters near \"%s\".\n", + cb->ext_name, entry->name, end); if (cb->nvals < ARRAY_SIZE(cb->val.u32_range)) { if (entry->type == XTTYPE_UINT8RC) cb->val.u8_range[cb->nvals] = value;