]> git.baikalelectronics.ru Git - uboot.git/commit
cli: Support macro processing with a fixed-size buffer
authorSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 17:33:47 +0000 (10:33 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 4 Dec 2020 21:10:01 +0000 (16:10 -0500)
commit2a47589df413fb4b4e60f1eaab80e99bcb9d8229
treec65c0433b09af9dc2fe711112845273d2ed3975e
parent8718ef7392599a804f226d60a293b29e8ce3caa0
cli: Support macro processing with a fixed-size buffer

At present cli_simple_process_macros() requires that the caller provide
an output buffer that is exactly CONFIG_SYS_CBSIZE bytes in length. This
makes sense since it is designed to be used from the command line. But we
also want to use it for bootargs substitution.

Update the function to allow the caller to specify the buffer size. Also
return an error if the buffer is exhausted. The caller can ignore that if
preferred.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/pxe_utils.c
common/cli_simple.c
include/cli.h