diff options
author | Roland Gaudig <roland.gaudig@weidmueller.com> | 2021-07-23 12:29:21 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-27 14:50:47 -0400 |
commit | f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149 (patch) | |
tree | ffb09d738a6f68edb543be8eac0f424ec15cd4d3 /cmd/Makefile | |
parent | 6244cda4f32cb95f66de2a61ef728f325514f8f6 (diff) | |
download | u-boot-f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149.zip u-boot-f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149.tar.gz u-boot-f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149.tar.bz2 |
cmd: setexpr: add format string handling
Add format string handling operator to the setexpr command.
It allows to use C or Bash like format string expressions to be
evaluated with the result being stored inside the environment variable
name.
setexpr <name> fmt <format> [value]...
The following example
setexpr foo fmt "%d, 0x%x" 0x100 ff
will result in $foo being set to "256, 0xff".
Signed-off-by: Roland Gaudig <roland.gaudig@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/Makefile')
-rw-r--r-- | cmd/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/Makefile b/cmd/Makefile index 9d10e07..ed36694 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -141,6 +141,7 @@ obj-$(CONFIG_CMD_SF) += sf.o obj-$(CONFIG_CMD_SCSI) += scsi.o disk.o obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o +obj-$(CONFIG_CMD_SETEXPR_FMT) += printf.o obj-$(CONFIG_CMD_SPI) += spi.o obj-$(CONFIG_CMD_STRINGS) += strings.o obj-$(CONFIG_CMD_SMC) += smccc.o |