Loading drivers/char/random.c +16 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,10 @@ #define ENTROPY_SHIFT 3 #define ENTROPY_BITS(r) ((r)->entropy_count >> ENTROPY_SHIFT) #ifdef CONFIG_SRANDOM #include <../drivers/char/srandom/srandom.h> #endif /* * The minimum number of bits of entropy before we wake up a read on * /dev/random. Should be enough to do a significant reseed. Loading Loading @@ -1853,6 +1857,7 @@ write_pool(struct entropy_store *r, const char __user *buffer, size_t count) return 0; } #ifndef CONFIG_SRANDOM static ssize_t random_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { Loading @@ -1864,6 +1869,7 @@ static ssize_t random_write(struct file *file, const char __user *buffer, return (ssize_t)count; } #endif static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg) { Loading Loading @@ -1928,8 +1934,13 @@ static int random_fasync(int fd, struct file *filp, int on) } const struct file_operations random_fops = { #ifdef CONFIG_SRANDOM .read = sdevice_read, .write = sdevice_write, #else .read = random_read, .write = random_write, #endif .poll = random_poll, .unlocked_ioctl = random_ioctl, .fasync = random_fasync, Loading @@ -1937,8 +1948,13 @@ const struct file_operations random_fops = { }; const struct file_operations urandom_fops = { #ifdef CONFIG_SRANDOM .read = sdevice_read, .write = sdevice_write, #else .read = urandom_read, .write = random_write, #endif .unlocked_ioctl = random_ioctl, .fasync = random_fasync, .llseek = noop_llseek, Loading Loading
drivers/char/random.c +16 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,10 @@ #define ENTROPY_SHIFT 3 #define ENTROPY_BITS(r) ((r)->entropy_count >> ENTROPY_SHIFT) #ifdef CONFIG_SRANDOM #include <../drivers/char/srandom/srandom.h> #endif /* * The minimum number of bits of entropy before we wake up a read on * /dev/random. Should be enough to do a significant reseed. Loading Loading @@ -1853,6 +1857,7 @@ write_pool(struct entropy_store *r, const char __user *buffer, size_t count) return 0; } #ifndef CONFIG_SRANDOM static ssize_t random_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { Loading @@ -1864,6 +1869,7 @@ static ssize_t random_write(struct file *file, const char __user *buffer, return (ssize_t)count; } #endif static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg) { Loading Loading @@ -1928,8 +1934,13 @@ static int random_fasync(int fd, struct file *filp, int on) } const struct file_operations random_fops = { #ifdef CONFIG_SRANDOM .read = sdevice_read, .write = sdevice_write, #else .read = random_read, .write = random_write, #endif .poll = random_poll, .unlocked_ioctl = random_ioctl, .fasync = random_fasync, Loading @@ -1937,8 +1948,13 @@ const struct file_operations random_fops = { }; const struct file_operations urandom_fops = { #ifdef CONFIG_SRANDOM .read = sdevice_read, .write = sdevice_write, #else .read = urandom_read, .write = random_write, #endif .unlocked_ioctl = random_ioctl, .fasync = random_fasync, .llseek = noop_llseek, Loading