<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/env, branch v2017.11</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>tools: env: allow to print U-Boot version</title>
<updated>2017-11-06T14:58:59+00:00</updated>
<author>
<name>Stefan Agner</name>
<email>stefan.agner@toradex.com</email>
</author>
<published>2017-10-26T12:57:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=84d46e7e8948780d7ca20c24dfc7b653b900f728'/>
<id>84d46e7e8948780d7ca20c24dfc7b653b900f728</id>
<content type='text'>
The fw_env utility family has a default environment compiled in
which ties it quite strongly to the U-Boot source/config it has
been built with. Allow to display the U-Boot version it has been
built with using the -v/--version argument.

Signed-off-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fw_env utility family has a default environment compiled in
which ties it quite strongly to the U-Boot source/config it has
been built with. Allow to display the U-Boot version it has been
built with using the -v/--version argument.

Signed-off-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: env: Add embedded.c to .gitignore</title>
<updated>2017-10-16T13:42:51+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-10-12T03:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3b306c37cdf7488254d078ce63f508eaedb2be41'/>
<id>3b306c37cdf7488254d078ce63f508eaedb2be41</id>
<content type='text'>
Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Add 'envtools' target to 'make help'</title>
<updated>2017-09-06T00:34:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-09-05T07:53:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=84a42069f253554dbc2c7b4bbd28149a7a88c0ab'/>
<id>84a42069f253554dbc2c7b4bbd28149a7a88c0ab</id>
<content type='text'>
The target is not currently mentioned anywhere. Add it to the help so
people can find it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The target is not currently mentioned anywhere. Add it to the help so
people can find it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Fix operation of 'make environ'</title>
<updated>2017-09-06T00:34:08+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-09-05T07:53:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=573329571435eae967182baf94b2146188fb1ee5'/>
<id>573329571435eae967182baf94b2146188fb1ee5</id>
<content type='text'>
This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in
two C files.

Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ')
Reported-by: Måns Rullgård &lt;mans@mansr.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in
two C files.

Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ')
Reported-by: Måns Rullgård &lt;mans@mansr.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Fix out of tree building of tools-all</title>
<updated>2017-09-05T19:59:47+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2017-09-05T18:01:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2d3229bea240a26516e70257e26757d0ec0d98f1'/>
<id>2d3229bea240a26516e70257e26757d0ec0d98f1</id>
<content type='text'>
With the move of environment code from common/ to env/ a number of
changes needed to be made to various make targets.  We missed updating
some of the files required for out of tree builds of the tools.  Correct
the 'environ' target to know that we need to work under tools/env/ still
(not tools/environ/) and then update the wrappers in env_attr.c and
env_flags.c to point to the new correct file.

Reported-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the move of environment code from common/ to env/ a number of
changes needed to be made to various make targets.  We missed updating
some of the files required for out of tree builds of the tools.  Correct
the 'environ' target to know that we need to work under tools/env/ still
(not tools/environ/) and then update the wrappers in env_attr.c and
env_flags.c to point to the new correct file.

Reported-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: fw_env: Prevent writing error message on special files, which don't support fsync</title>
<updated>2017-09-03T19:30:31+00:00</updated>
<author>
<name>Lukasz Majewski</name>
<email>lukma@denx.de</email>
</author>
<published>2017-08-27T11:46:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=40fe89c6e83791f1f9cd079d7d6b51598c4a5925'/>
<id>40fe89c6e83791f1f9cd079d7d6b51598c4a5925</id>
<content type='text'>
According to fsync specification [1] some special files (e.g., a pipe, FIFO,
or socket) don't support synchronization and return either EROFS or EINVAL.

On the linux side the sys_fsync -&gt; do_fsync() checks if the requested file
has f_op-&gt;fsync defined. If not it returns EINVAL [2].

This commit prevents writing error messages for files (devices), which
do not support fsync().

[1] - http://man7.org/linux/man-pages/man2/fsync.2.html
[2] - http://elixir.free-electrons.com/linux/v4.13-rc6/source/fs/sync.c#L183

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Acked-by: Michael Heimpold &lt;mhei@heimpold.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to fsync specification [1] some special files (e.g., a pipe, FIFO,
or socket) don't support synchronization and return either EROFS or EINVAL.

On the linux side the sys_fsync -&gt; do_fsync() checks if the requested file
has f_op-&gt;fsync defined. If not it returns EINVAL [2].

This commit prevents writing error messages for files (devices), which
do not support fsync().

[1] - http://man7.org/linux/man-pages/man2/fsync.2.html
[2] - http://elixir.free-electrons.com/linux/v4.13-rc6/source/fs/sync.c#L183

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Acked-by: Michael Heimpold &lt;mhei@heimpold.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Rename setenv() to env_set()</title>
<updated>2017-08-16T12:22:18+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2017-08-03T18:22:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=382bee57f19b4454e2015bc19a010bc2d0ab9337'/>
<id>382bee57f19b4454e2015bc19a010bc2d0ab9337</id>
<content type='text'>
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk &lt;wd@denx.de&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk &lt;wd@denx.de&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/fw_env: use fsync to ensure that data is physically stored</title>
<updated>2017-07-22T19:36:16+00:00</updated>
<author>
<name>Michael Heimpold</name>
<email>mhei@heimpold.de</email>
</author>
<published>2013-05-20T19:34:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e99e14d4ba2533a07adc3d97e06cadc41d12908'/>
<id>7e99e14d4ba2533a07adc3d97e06cadc41d12908</id>
<content type='text'>
Closing a file descriptor does not guarantee that the data has been
successfully saved to disk, as the kernel might defer the write.

Signed-off-by: Michael Heimpold &lt;mhei@heimpold.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closing a file descriptor does not guarantee that the data has been
successfully saved to disk, as the kernel might defer the write.

Signed-off-by: Michael Heimpold &lt;mhei@heimpold.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/env: avoid memory leak in fw_setenv</title>
<updated>2017-04-18T14:29:22+00:00</updated>
<author>
<name>xypron.glpk@gmx.de</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2017-04-15T11:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ddc6a9de057e0fd0b46ba21d16a50a8d24351ef6'/>
<id>ddc6a9de057e0fd0b46ba21d16a50a8d24351ef6</id>
<content type='text'>
If realloc fails we should release the old buffer.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If realloc fails we should release the old buffer.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: fix memory leak in fw_env routines</title>
<updated>2017-04-12T17:28:29+00:00</updated>
<author>
<name>Stefano Babic</name>
<email>sbabic@denx.de</email>
</author>
<published>2017-04-05T16:08:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=33f0086cb74628080bb4bcb565b25c8ea5299d79'/>
<id>33f0086cb74628080bb4bcb565b25c8ea5299d79</id>
<content type='text'>
fw_env_open allocates buffers to store the environment, but these
buffers are never freed. This becomes quite nasty using the fw_ tools as
library, because each access to the environment (even just reading a
variable) generates a memory leak equal to the size of the environment.

Fix this renaming fw_env_close() as fw_env_flush(), because the function
really flushes the environment from RAM to storage, and add a
fw_env_close function to free the allocated resources.

Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fw_env_open allocates buffers to store the environment, but these
buffers are never freed. This becomes quite nasty using the fw_ tools as
library, because each access to the environment (even just reading a
variable) generates a memory leak equal to the size of the environment.

Fix this renaming fw_env_close() as fw_env_flush(), because the function
really flushes the environment from RAM to storage, and add a
fw_env_close function to free the allocated resources.

Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
