提交 53c3f63e 编写于 作者: M Matt Mackall 提交者: Linus Torvalds

random: reuse rand_initialize

Signed-off-by: NMatt Mackall <mpm@selenic.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 43ae4860
......@@ -899,7 +899,7 @@ static void init_std_data(struct entropy_store *r)
sizeof(*(utsname()))/4);
}
static int __init rand_initialize(void)
static int rand_initialize(void)
{
init_std_data(&input_pool);
init_std_data(&blocking_pool);
......@@ -1101,9 +1101,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
/* Clear the entropy pool counters. */
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
init_std_data(&input_pool);
init_std_data(&blocking_pool);
init_std_data(&nonblocking_pool);
rand_initialize();
return 0;
default:
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册