diff options
| author | Michael Brown | 2012-03-18 17:45:04 +0100 |
|---|---|---|
| committer | Michael Brown | 2012-03-18 18:05:37 +0100 |
| commit | 196f0bb081db462bc0f9a9462f47c9639101204b (patch) | |
| tree | 05e772f3202b4c0f326491c90af0cb5dbf7eb147 /src/include | |
| parent | [crypto] Remove obsolete AXTLS RSA algorithm (diff) | |
| download | ipxe-196f0bb081db462bc0f9a9462f47c9639101204b.tar.gz ipxe-196f0bb081db462bc0f9a9462f47c9639101204b.tar.xz ipxe-196f0bb081db462bc0f9a9462f47c9639101204b.zip | |
[rng] Allow entropy_enable() to return an error
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/entropy.h | 3 | ||||
| -rw-r--r-- | src/include/ipxe/null_entropy.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/include/ipxe/entropy.h b/src/include/ipxe/entropy.h index 02dde2f1d..50ba4fc63 100644 --- a/src/include/ipxe/entropy.h +++ b/src/include/ipxe/entropy.h @@ -61,8 +61,9 @@ typedef uint8_t entropy_sample_t; /** * Enable entropy gathering * + * @ret rc Return status code */ -void entropy_enable ( void ); +int entropy_enable ( void ); /** * Disable entropy gathering diff --git a/src/include/ipxe/null_entropy.h b/src/include/ipxe/null_entropy.h index 0bfec802d..646d1a17e 100644 --- a/src/include/ipxe/null_entropy.h +++ b/src/include/ipxe/null_entropy.h @@ -19,9 +19,10 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ENTROPY_PREFIX_null __null_ #endif -static inline __always_inline void +static inline __always_inline int ENTROPY_INLINE ( null, entropy_enable ) ( void ) { /* Do nothing */ + return 0; } static inline __always_inline void |
