<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/env_flags.c, branch v2016.11-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>tools: fix env_flags build</title>
<updated>2016-02-15T20:58:25+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2016-02-14T19:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ed0f40a673c42b4174ccb34e3c6d7b46cd90b701'/>
<id>ed0f40a673c42b4174ccb34e3c6d7b46cd90b701</id>
<content type='text'>
$ make tools-all
  ...
  In file included from tools/env/env_flags.c:1:0:
  tools/env/../../common/env_flags.c: In function
    ‘env_flags_parse_varaccess_from_binflags’:
    tools/env/../../common/env_flags.c:156:18: warning: implicit declaration
    of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
      for (i = 0; i &lt; ARRAY_SIZE(env_flags_varaccess_mask); i++)
                      ^
Seems like the other utilities just add a copy of ARRAY_SIZE since
there's nowhere to include it from (tools/imagetool.h,
tools/mxsimage.h). Let's do the same here.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
$ make tools-all
  ...
  In file included from tools/env/env_flags.c:1:0:
  tools/env/../../common/env_flags.c: In function
    ‘env_flags_parse_varaccess_from_binflags’:
    tools/env/../../common/env_flags.c:156:18: warning: implicit declaration
    of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
      for (i = 0; i &lt; ARRAY_SIZE(env_flags_varaccess_mask); i++)
                      ^
Seems like the other utilities just add a copy of ARRAY_SIZE since
there's nowhere to include it from (tools/imagetool.h,
tools/mxsimage.h). Let's do the same here.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: env validate: pass values as 0-based array</title>
<updated>2016-02-08T15:10:29+00:00</updated>
<author>
<name>Andreas Fenkart</name>
<email>andreas.fenkart@digitalstrom.com</email>
</author>
<published>2015-12-09T12:13:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=167f52587173ad87aac7780058d59aa96422eed0'/>
<id>167f52587173ad87aac7780058d59aa96422eed0</id>
<content type='text'>
passing argv/argc can produce off-by-one errors

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
passing argv/argc can produce off-by-one errors

Signed-off-by: Andreas Fenkart &lt;andreas.fenkart@digitalstrom.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: env_flags: fix loop condition when using env_flags_varaccess_mask</title>
<updated>2016-01-14T02:05:26+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2016-01-12T09:23:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=db18f548cb7b5ff99223b66eac1966eb45230817'/>
<id>db18f548cb7b5ff99223b66eac1966eb45230817</id>
<content type='text'>
We should use ARRAY_SIZE, but not sizeof. The size of
env_flags_varaccess_mask is 16bytes, but we only need 4 loops.
If using 16 as the end condition, we may access memory that
not belong to array env_flags_varaccess_mask.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Cc: York Sun &lt;yorksun@freescale.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should use ARRAY_SIZE, but not sizeof. The size of
env_flags_varaccess_mask is 16bytes, but we only need 4 loops.
If using 16 as the end condition, we may access memory that
not belong to array env_flags_varaccess_mask.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Cc: York Sun &lt;yorksun@freescale.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: env: initialize scalar variable</title>
<updated>2016-01-04T17:25:35+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2015-12-23T04:07:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5a6894397a657edec5d0cf4e20968cc66a368c51'/>
<id>5a6894397a657edec5d0cf4e20968cc66a368c51</id>
<content type='text'>
Before calling hsearch_r, initialize callback entry to NULL.

Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"

Reported-by: Coverity
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before calling hsearch_r, initialize callback entry to NULL.

Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"

Reported-by: Coverity
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/env_flags.c: Add function to validate a MAC address</title>
<updated>2015-09-21T15:29:47+00:00</updated>
<author>
<name>Codrin Ciubotariu</name>
<email>codrin.ciubotariu@freescale.com</email>
</author>
<published>2015-09-09T15:00:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0118e83ba4e1811515dc944a826758cad8a394b7'/>
<id>0118e83ba4e1811515dc944a826758cad8a394b7</id>
<content type='text'>
The code that checks if a string has the format of a MAC address has been
moved to a separate function called eth_validate_ethaddr_str().

This has been done to allow other components (such as vsc9953 driver)
to validate a MAC address.

Signed-off-by: Codrin Ciubotariu &lt;codrin.ciubotariu@freescale.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: York Sun &lt;yorksun@freescale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code that checks if a string has the format of a MAC address has been
moved to a separate function called eth_validate_ethaddr_str().

This has been done to allow other components (such as vsc9953 driver)
to validate a MAC address.

Signed-off-by: Codrin Ciubotariu &lt;codrin.ciubotariu@freescale.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: York Sun &lt;yorksun@freescale.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Allow env_attr_walk to pass a priv * to callback</title>
<updated>2015-05-21T13:13:19+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2015-05-20T19:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cca98fd6aa111f622be09ffdb5c59684c5e160af'/>
<id>cca98fd6aa111f622be09ffdb5c59684c5e160af</id>
<content type='text'>
In some cases it can be helpful to have context in the callback about
the calling situation. This is needed for following patches.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases it can be helpful to have context in the callback about
the calling situation. This is needed for following patches.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common, env: optimize boottime</title>
<updated>2014-01-14T14:01:06+00:00</updated>
<author>
<name>Heiko Schocher</name>
<email>hs@denx.de</email>
</author>
<published>2013-12-19T12:45:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1b6102718bc5514cf974abeecebebe95c6a9ecc6'/>
<id>1b6102718bc5514cf974abeecebebe95c6a9ecc6</id>
<content type='text'>
when creating the hashtable, for each environmentvariable
getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called,
which costs at this point a lot of time. So call this two
getenv() calls only once.

Boottime on the ids8313 board without this patch:

2013-12-19 13:38:22,894:  NAND:  128 MiB
2013-12-19 13:38:27,659:  In:    serial
(~4.8 sec)

Bootime with this patch on the ids8313 board:

2013-12-19 13:40:25,332:  NAND:  128 MiB
2013-12-19 13:40:25,546:  In:    serial
(~0.2 sec)

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Tom Rini &lt;trini@ti.com&gt;
Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when creating the hashtable, for each environmentvariable
getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called,
which costs at this point a lot of time. So call this two
getenv() calls only once.

Boottime on the ids8313 board without this patch:

2013-12-19 13:38:22,894:  NAND:  128 MiB
2013-12-19 13:38:27,659:  In:    serial
(~4.8 sec)

Bootime with this patch on the ids8313 board:

2013-12-19 13:40:25,332:  NAND:  128 MiB
2013-12-19 13:40:25,546:  In:    serial
(~0.2 sec)

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Tom Rini &lt;trini@ti.com&gt;
Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add GPL-2.0+ SPDX-License-Identifier to source files</title>
<updated>2013-07-24T13:44:38+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2013-07-08T07:37:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a4596601fd395f3afb8f82f3f840c5e00bdd57a'/>
<id>1a4596601fd395f3afb8f82f3f840c5e00bdd57a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Handle write-once ethaddr and serial# generically</title>
<updated>2012-12-13T18:46:57+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2012-12-12T04:16:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1d6cd0a3f69b549a3fc7e735a045279e7a14947e'/>
<id>1d6cd0a3f69b549a3fc7e735a045279e7a14947e</id>
<content type='text'>
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Add support for access control to .flags</title>
<updated>2012-12-13T18:46:56+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2012-12-12T04:16:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=267541f776f1e2bec21681c6e39a4c93af9621cf'/>
<id>267541f776f1e2bec21681c6e39a4c93af9621cf</id>
<content type='text'>
Add support for read-only, write-once, and change-default.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for read-only, write-once, and change-default.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
