repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ARCv2: SLC: Make sure busy bit is set properly for region ops
[linux/fpc-iii.git]
/
scripts
/
gcc-plugins
/
gen-random-seed.sh
blob
7514850f4815b5f7b337d8ec8ccc57b27b2f1026
1
#!/bin/sh
2
3
if
[ !
-f
"
$1
"
];
then
4
SEED
=
`od -A n -t x8 -N 32 /dev/urandom | tr -d '
\n
'`
5
echo
"const char *randstruct_seed =
\"
$SEED
\"
;"
>
"
$1
"
6
HASH
=
`echo -n "
$SEED
" | sha256sum | cut -d" " -f1 | tr -d '
\n
'`
7
echo
"#define RANDSTRUCT_HASHED_SEED
\"
$HASH
\"
"
>
"
$2
"
8
fi