<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/nvedit.c, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/cmd/nvedit.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/cmd/nvedit.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-05-09T15:38:33Z</updated>
<entry>
<title>cmd: nvedit: remove error check, handle with Kconfig</title>
<updated>2023-05-09T15:38:33Z</updated>
<author>
<name>Troy Kisky</name>
<email>troykiskyboundary@gmail.com</email>
</author>
<published>2023-03-13T21:31:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=289aa6a371efdb3dae0cd5bdcf694d7fb4568477'/>
<id>urn:sha1:289aa6a371efdb3dae0cd5bdcf694d7fb4568477</id>
<content type='text'>
Avoid error messages when SPL,TPL,VPL build don't
have the environment options of the main build.
This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed
to CONFIG_IS_ENABLED(ENV_IS_IN_xxx).

Signed-off-by: Troy Kisky &lt;troykiskyboundary@gmail.com&gt;
</content>
</entry>
<entry>
<title>nvedit: simplify do_env_indirect()</title>
<updated>2023-03-30T19:09:59Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2023-03-06T13:27:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=732b0825475c1a2466a6abf6e223b2a77af011f2'/>
<id>urn:sha1:732b0825475c1a2466a6abf6e223b2a77af011f2</id>
<content type='text'>
Instead of calling env_get(from) up to three times, just do it once,
computing the value we will put into 'to' and error out if that is
NULL (i.e. no 'from' variable and no default provided).

No functional change.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>Correct SPL use of CMD_NVEDIT_EFI</title>
<updated>2023-02-09T21:32:26Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-02-05T22:36:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ddeac15e016c4ce9992f285c26f7171e7a96a323'/>
<id>urn:sha1:ddeac15e016c4ce9992f285c26f7171e7a96a323</id>
<content type='text'>
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_NVEDIT_EFI defined in Kconfig

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>env: Drop ENV_IS_IN_SATA</title>
<updated>2023-02-07T19:33:48Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-02-01T20:19:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=65a7310de64a780b08c77dac8e1ee66b63066cda'/>
<id>urn:sha1:65a7310de64a780b08c77dac8e1ee66b63066cda</id>
<content type='text'>
This is not used anywhere, so drop it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cmd: env: Add `indirect` to indirectly set values</title>
<updated>2022-04-07T20:50:42Z</updated>
<author>
<name>Samuel Dionne-Riel</name>
<email>samuel@dionne-riel.com</email>
</author>
<published>2021-12-20T23:31:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ec57bd745470fc47b278c21d2eebc95c27c442e5'/>
<id>urn:sha1:ec57bd745470fc47b278c21d2eebc95c27c442e5</id>
<content type='text'>
This allows an ergonomic-enough approximation of ${!variable} expansion.
This could be used the following way:

```
for target in ${boot_targets}; do
   env indirect target_name target_name_${target}
   # ...
done
```

Assuming `target_name_mmc0` and similar are set appropriately.

A default value can be optionally provided.

Note: this acts on environment variables, not hush variables.

Signed-off-by: Samuel Dionne-Riel &lt;samuel@dionne-riel.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: "Marek Behún" &lt;marek.behun@nic.cz&gt;
[trini: Don't enable by default]
</content>
</entry>
<entry>
<title>env: Move non-cli env functions to env/common.c</title>
<updated>2021-10-21T18:50:48Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-17T15:36:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f231566475c545de476a3bf5f596c246c52511aa'/>
<id>urn:sha1:f231566475c545de476a3bf5f596c246c52511aa</id>
<content type='text'>
Move the following functions from cmd/nvedit.c to env/common.c:
  env_set_ulong()
  env_set_hex()
  env_get_hex()
  eth_env_get_enetaddr()
  eth_env_set_enetaddr()
  env_get()
  from_env()
  env_get_f()
  env_get_ulong()
since these functions are not specific for U-Boot's CLI.

We leave env_set() in cmd/nvedit.c, since it calls _do_env_set(), which
is a static function in that file.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>env: Simplify env_match() and inline into env_get_f()</title>
<updated>2021-10-21T18:50:48Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-17T15:36:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a80652ebb394abfd508feb38090228f5e5290d32'/>
<id>urn:sha1:a80652ebb394abfd508feb38090228f5e5290d32</id>
<content type='text'>
In the past the env_match() function was used to match envs with
- name, i.e. string "name"
- variable assignment, i.e. string "name=other_value"

The latter is not the case anymore, since the env_match() function is
now used only in env_get_f(), and so we can simplify the function into
a simple strncmp() with an additional comparison to '='.

Let's do this, and since the resulting function is quite simple, let's
also inline its code into env_get_f().

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>env: Use memcpy() instead of ad-hoc code to copy variable value</title>
<updated>2021-10-21T18:50:48Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-17T15:36:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a473766cce44882237e567bcd58f7559ecdd0440'/>
<id>urn:sha1:a473766cce44882237e567bcd58f7559ecdd0440</id>
<content type='text'>
Copy the value of the found variable into given buffer with memcpy()
instead of ad-hoc code.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>env: Make return value of env_get_f() behave like sprintf() on success</title>
<updated>2021-10-21T18:50:48Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-17T15:36:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3112ce0ce8195880aec5e9373434a85e21c3e1af'/>
<id>urn:sha1:3112ce0ce8195880aec5e9373434a85e21c3e1af</id>
<content type='text'>
Currently the env_get_f() function's return value behaves weirdly: it
returns the number of bytes written into `buf`, but whether this is
excluding the terminating NULL-byte or including it depends on whether
there was enough space in `buf`.

Change the function to always return the actual length of the value of
the environment variable (excluding the terminating NULL-byte) on
success. This makes it behave like sprintf().

All users of this function in U-Boot are compatible with this change.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>env: Early return from env_get_f() on NULL name</title>
<updated>2021-10-21T18:50:48Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-17T15:36:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6b6e3eeba9f96b5d908a9b46b7bb25e76109a0c7'/>
<id>urn:sha1:6b6e3eeba9f96b5d908a9b46b7bb25e76109a0c7</id>
<content type='text'>
Test non-NULL name immediately, not in env_match().

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
