2 #include <lunaix/device.h>
3 #include <lunaix/syslog.h>
8 __rand_rd_pg(struct device* dev, void* buf, size_t offset)
10 rnd_fill(buf, PG_SIZE);
15 __rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
22 devbuiltin_init_rand()
24 if (!rnd_is_supported()) {
25 kprintf(KWARN "not supported.\n");
28 struct device* devrand = device_addseq(NULL, NULL, "rand");
29 devrand->read = __rand_rd;
30 devrand->read_page = __rand_rd_pg;