kernel: random: ifdef z_early_boot_rand_get
This function had a to sys_rand_get() even without random source. As Zephyr is built with linkage garbage collection and this function is called only if either ENTROPY_HAS_DRIVER or TEST_RANDOM_GENERATOR is enabled and these options automatically enable a random source. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
e242f020f4
commit
8ae822c9fa
1 changed files with 3 additions and 0 deletions
|
@ -424,6 +424,7 @@ static FUNC_NORETURN void switch_to_main_thread(void)
|
|||
}
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
|
||||
#if defined(CONFIG_ENTROPY_HAS_DRIVER) || defined(CONFIG_TEST_RANDOM_GENERATOR)
|
||||
void z_early_boot_rand_get(u8_t *buf, size_t length)
|
||||
{
|
||||
int n = sizeof(u32_t);
|
||||
|
@ -479,6 +480,8 @@ sys_rand_fallback:
|
|||
length -= n;
|
||||
}
|
||||
}
|
||||
/* defined(CONFIG_ENTROPY_HAS_DRIVER) || defined(CONFIG_TEST_RANDOM_GENERATOR) */
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue