-
Bug
-
Resolution: Won't Do
-
Medium
-
None
-
None
-
None
unformat failed to parse parameters of u32 followed by u16. u32 always get 0. here is the sample code and test result.
static clib_error_t *
f(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
{
u32 x=1;
u16 y=2;
unformat(input, "%d %d", &x, &y);
printf("\nx=%d y=%d\n", x, y);
return 0;
}
/* INDENT-OFF */
VLIB_CLI_COMMAND (f_cmd, static) = {
.path = "f",
.short_help = "f <x> <y>",
.function = f,
};
/* INDENT-ON */
vpp# f 3 4
x=0 y=4
vpp#