aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorJoe Maples <joe@frap129.org>2016-08-28 13:10:23 +0000
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:57:04 +0200
commit348fec78a63fc91b4d0bf2534d56b4f7cb7a27c1 (patch)
tree74fa917aa0630c3c18b683cce78fa6627bcd8653 /include/uapi/linux
parent34a20a12e3d15c06b0d9253fe0af3b134d1917b2 (diff)
random: Backport driver from 4.1.31
Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/random.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/linux/random.h b/include/uapi/linux/random.h
index fff3528a0..db52f1c5e 100644
--- a/include/uapi/linux/random.h
+++ b/include/uapi/linux/random.h
@@ -22,7 +22,7 @@
/* Get the contents of the entropy pool. (Superuser only.) */
#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
-/*
+/*
* Write bytes into the entropy pool and add to the entropy count.
* (Superuser only.)
*/
@@ -40,4 +40,13 @@ struct rand_pool_info {
__u32 buf[0];
};
+/*
+ * Flags for getrandom(2)
+ *
+ * GRND_NONBLOCK Don't block and return EAGAIN instead
+ * GRND_RANDOM Use the /dev/random pool instead of /dev/urandom
+ */
+#define GRND_NONBLOCK 0x0001
+#define GRND_RANDOM 0x0002
+
#endif /* _UAPI_LINUX_RANDOM_H */