<p>Nicola Corna has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20980">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tint: Use the current time as random seed<br><br>Previously the random seed was fixed, which led to the same sequence of<br>blocks for each run.<br><br>Change-Id: I2e482bbb9d33cdbbf3c15916458329f99fbc4450<br>Signed-off-by: Nicola Corna <nicola@corna.info><br>---<br>M payloads/external/tint/libpayload_tint.patch<br>1 file changed, 7 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/20980/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/payloads/external/tint/libpayload_tint.patch b/payloads/external/tint/libpayload_tint.patch<br>index b5592dd..21b93a3 100644<br>--- a/payloads/external/tint/libpayload_tint.patch<br>+++ b/payloads/external/tint/libpayload_tint.patch<br>@@ -939,19 +939,22 @@<br>  <br>  /*<br>   * Initialize random number generator<br>-@@ -41,8 +43,11 @@ void rand_init ()<br>+@@ -41,8 +43,14 @@ void rand_init ()<br>  #ifdef USE_RAND<br>     srand (time (NULL));<br>  #else<br> +#if 0<br>     srandom (time (NULL));<br>  #endif<br>-+   srandom (123);<br>++   struct timeval tp;<br>++<br>++   gettimeofday (&tp, NULL);<br>++   srandom (tp.tv_sec);<br> +#endif<br>  }<br>  <br>  /*<br>-@@ -61,6 +66,7 @@ int rand_value (int range)<br>+@@ -61,6 +69,7 @@ int rand_value (int range)<br>   * Convert an str to long. Returns TRUE if successful,<br>   * FALSE otherwise.<br>   */<br>@@ -959,7 +962,7 @@<br>  bool str2int (int *i,const char *str)<br>  {<br>     char *endptr;<br>-@@ -69,3 +75,4 @@ bool str2int (int *i,const char *str)<br>+@@ -69,3 +78,4 @@ bool str2int (int *i,const char *str)<br>     return TRUE;<br>  }<br>  <br></pre><p>To view, visit <a href="https://review.coreboot.org/20980">change 20980</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20980"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2e482bbb9d33cdbbf3c15916458329f99fbc4450 </div>
<div style="display:none"> Gerrit-Change-Number: 20980 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nicola Corna <nicola@corna.info> </div>