diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-08-09 11:09:27 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-08-09 11:18:39 +0200 |
| commit | 820498b2158e0b05421ce0922f203a0699927fa8 (patch) | |
| tree | 3bf6d1089b762535ec5e59738d47ae2d2f54750f /shared/systemd/src/basic/random-util.h | |
| parent | 1bd9f376796563dfb5016bada66c78b203f41d33 (diff) | |
| parent | 488dda3930545969f5644b57cfca81e21df031c3 (diff) | |
Merge remote-tracking branch 'salsa/master'
Diffstat (limited to 'shared/systemd/src/basic/random-util.h')
| -rw-r--r-- | shared/systemd/src/basic/random-util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/systemd/src/basic/random-util.h b/shared/systemd/src/basic/random-util.h index 3e8c288d..148b6c78 100644 --- a/shared/systemd/src/basic/random-util.h +++ b/shared/systemd/src/basic/random-util.h @@ -8,11 +8,11 @@ typedef enum RandomFlags { RANDOM_EXTEND_WITH_PSEUDO = 1 << 0, /* If we can't get enough genuine randomness, but some, fill up the rest with pseudo-randomness */ RANDOM_BLOCK = 1 << 1, /* Rather block than return crap randomness (only if the kernel supports that) */ - RANDOM_DONT_DRAIN = 1 << 2, /* If we can't get any randomness at all, return early with -EAGAIN */ + RANDOM_MAY_FAIL = 1 << 2, /* If we can't get any randomness at all, return early with -ENODATA */ RANDOM_ALLOW_RDRAND = 1 << 3, /* Allow usage of the CPU RNG */ } RandomFlags; -int genuine_random_bytes(void *p, size_t n, RandomFlags flags); /* returns "genuine" randomness, optionally filled upwith pseudo random, if not enough is available */ +int genuine_random_bytes(void *p, size_t n, RandomFlags flags); /* returns "genuine" randomness, optionally filled up with pseudo random, if not enough is available */ void pseudo_random_bytes(void *p, size_t n); /* returns only pseudo-randommess (but possibly seeded from something better) */ void random_bytes(void *p, size_t n); /* returns genuine randomness if cheaply available, and pseudo randomness if not. */ |