2 #include <lunaix/device.h>
3 #include <lunaix/mm/page.h>
4 #include <lunaix/syslog.h>
9 __rand_rd_pg(struct device* dev, void* buf, size_t offset)
11 // rnd_fill(buf, PG_SIZE);
16 __rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
18 // rnd_fill(buf, len);
23 devbuiltin_init_rand()
25 // TODO rnd device need better abstraction
27 kprintf(KWARN "not supported.\n");
30 struct device* devrand = device_addseq(NULL, NULL, "rand");
31 devrand->read = __rand_rd;
32 devrand->read_page = __rand_rd_pg;