<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/gen_eth_addr.c, branch v2016.03</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: gen_eth_addr: add getpid() to time(0) to avoid duplicated seed</title>
<updated>2015-09-28T14:48:25+00:00</updated>
<author>
<name>Josh Wu</name>
<email>josh.wu@atmel.com</email>
</author>
<published>2015-09-16T10:21:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e4dad50320d20894710276eb09f2057c6985065'/>
<id>3e4dad50320d20894710276eb09f2057c6985065</id>
<content type='text'>
As 'time(0) | getpid()' will have a lot of duplicated value. It is not a
expected behavior. We expect different value for the seed when when run
it in many times.

So this patch will left shift the getpid() and add to time(0). That
avoid duplicated value.

Test command is like:
  % RUN=0; while [ $RUN -lt 10000 ]; do
  tools/gen_eth_addr; RUN=$(($RUN+1)); done | sort | uniq | wc -l
  10000

This patch is incorporated with suggestions made by Wolfgang Denk and Andreas
Bießmann. Thanks them a lot.

Signed-off-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Acked-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Acked-by: Wolfgang Denk &lt;wd@denx.de&gt;
Tested-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As 'time(0) | getpid()' will have a lot of duplicated value. It is not a
expected behavior. We expect different value for the seed when when run
it in many times.

So this patch will left shift the getpid() and add to time(0). That
avoid duplicated value.

Test command is like:
  % RUN=0; while [ $RUN -lt 10000 ]; do
  tools/gen_eth_addr; RUN=$(($RUN+1)); done | sort | uniq | wc -l
  10000

This patch is incorporated with suggestions made by Wolfgang Denk and Andreas
Bießmann. Thanks them a lot.

Signed-off-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Acked-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Acked-by: Wolfgang Denk &lt;wd@denx.de&gt;
Tested-by: 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>gen_eth_addr: Use POSIX rand() and srand()</title>
<updated>2009-04-03T23:09:56+00:00</updated>
<author>
<name>Peter Tyser</name>
<email>ptyser@xes-inc.com</email>
</author>
<published>2009-03-13T23:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2eeb4e95fbfafe54645fae7ec0b2594101f0573b'/>
<id>2eeb4e95fbfafe54645fae7ec0b2594101f0573b</id>
<content type='text'>
Replace random()/srandom() use with rand()/srand() to support
compilation with the mingw toolchain.  The rand()/srand() functions are
generally more common and are functionally equivalent to the original
random()/srandom() calls.

Signed-off-by: Peter Tyser &lt;ptyser@xes-inc.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace random()/srandom() use with rand()/srand() to support
compilation with the mingw toolchain.  The rand()/srand() functions are
generally more common and are functionally equivalent to the original
random()/srandom() calls.

Signed-off-by: Peter Tyser &lt;ptyser@xes-inc.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial revision</title>
<updated>2001-09-06T22:25:14+00:00</updated>
<author>
<name>wdenk</name>
<email>wdenk</email>
</author>
<published>2001-09-06T22:25:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5745185e6af453d48e728770e45c3c8fd74a8d11'/>
<id>5745185e6af453d48e728770e45c3c8fd74a8d11</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
