Skip to content
Commit 8b91f28b authored by Patrick Delaunay's avatar Patrick Delaunay
Browse files

stm32mp: stm32prog: fix the last character of dfu_alt_add third parameter



The third parameter of dfu_alt_add(), the string description of alternate,
is build in stm32prog_alt_add() with a unnecessary character ';' at the
end of the string.

This separator was required in the first implementation of
dfu_alt_add() but is no more needed in the current implementation;
this separator is managed only in dfu_config_interfaces() which call
dfu_alt_add() for this parameter without this separator.

And since the commit 53b40636 ("DFU: Check the number of arguments
and argument string strictly"), this added character cause an error when
the stm32prog command is executed because the third parameter of
dfu_alt_add() must be a string with a numerical value; 's' must be NULL
in the result of call in dfu_fill_entity_mmc():
  third_arg = simple_strtoul(argv[2], &s, 0);

Fixes: 53b40636 ("DFU: Check the number of arguments and argument string strictly")
Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
parent 9abfbef5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment