mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-22 02:16:44 +00:00
lxip: fake get_random_bytes()
This commit is contained in:
parent
c05a80a139
commit
1ba4e033a7
@ -43,8 +43,6 @@ enum {
|
||||
** Plugin interface **
|
||||
**********************/
|
||||
|
||||
extern "C" void wait_for_continue();
|
||||
|
||||
namespace {
|
||||
|
||||
class Plugin_context : public Libc::Plugin_context
|
||||
|
@ -229,7 +229,6 @@ DUMMY(-1, getnstimeofday)
|
||||
DUMMY(-1, get_nulls_value)
|
||||
DUMMY(-1, get_options)
|
||||
DUMMY(-1, get_page)
|
||||
DUMMY(-1, get_random_bytes)
|
||||
DUMMY(-1, gfp_pfmemalloc_allowed)
|
||||
DUMMY(-1, gid_lte)
|
||||
DUMMY(-1, hash32_ptr)
|
||||
|
@ -2602,6 +2602,21 @@ static inline bool ipv4_is_loopback(__be32 addr)
|
||||
#include <uapi/linux/in6.h>
|
||||
|
||||
|
||||
/********************
|
||||
** linux/random.h **
|
||||
********************/
|
||||
|
||||
static inline void get_random_bytes(void *buf, int nbytes)
|
||||
{
|
||||
char *b = (char *)buf;
|
||||
|
||||
/* FIXME not random */
|
||||
int i;
|
||||
for (i = 0; i < nbytes; ++i)
|
||||
b[i] = i + 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Misc
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user