<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/printf.h, branch v2024.07-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>cmd: setexpr: add format string handling</title>
<updated>2021-07-27T18:50:47+00:00</updated>
<author>
<name>Roland Gaudig</name>
<email>roland.gaudig@weidmueller.com</email>
</author>
<published>2021-07-23T12:29:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149'/>
<id>f4f8d8bb1abc79c4186ee8dc2ea536d62c6cb149</id>
<content type='text'>
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 &lt;name&gt; fmt &lt;format&gt; [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 &lt;roland.gaudig@weidmueller.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;name&gt; fmt &lt;format&gt; [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 &lt;roland.gaudig@weidmueller.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
