summaryrefslogtreecommitdiff
path: root/ubi-utils/src/common.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-09-28 11:50:51 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-09-28 11:50:51 +0300
commit75d97ca45b74eccc01b18f44040f946d9d5df9f5 (patch)
tree09f65340037347155934eda7ac2123cc0614915a /ubi-utils/src/common.h
parent0e63a4c4f1ebc31f545835bd018174414928fc6f (diff)
ubinize/ubiformat: improve random number seeding
Add current time to the PID to improve the pseudo-random number generator seeding. Also, use 'rand()' instead of 'random()', because 'srand()' is for 'rand()'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/common.h')
-rw-r--r--ubi-utils/src/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ubi-utils/src/common.h b/ubi-utils/src/common.h
index 955c50f..d14cb48 100644
--- a/ubi-utils/src/common.h
+++ b/ubi-utils/src/common.h
@@ -78,6 +78,7 @@ static inline int is_power_of_2(unsigned long long n)
long long ubiutils_get_bytes(const char *str);
void ubiutils_print_bytes(long long bytes, int bracket);
void ubiutils_print_text(FILE *stream, const char *txt, int len);
+int ubiutils_srand(void);
#ifdef __cplusplus
}