git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: decouple i386 specific instruction invocation
[lunaix-os.git]
/
lunaix-os
/
kernel
/
device
/
builtin
/
devrand.c
diff --git
a/lunaix-os/kernel/device/builtin/devrand.c
b/lunaix-os/kernel/device/builtin/devrand.c
index 7526601a84a4311a9b2a551b1734bc7ad2d3adb1..ce85c39beced31ff0ffbc8d801d04bea4084c540 100644
(file)
--- a/
lunaix-os/kernel/device/builtin/devrand.c
+++ b/
lunaix-os/kernel/device/builtin/devrand.c
@@
-7,21
+7,22
@@
LOG_MODULE("rand")
int
__rand_rd_pg(struct device* dev, void* buf, size_t offset)
{
int
__rand_rd_pg(struct device* dev, void* buf, size_t offset)
{
- rnd_fill(buf, PG_SIZE);
+
//
rnd_fill(buf, PG_SIZE);
return PG_SIZE;
}
int
__rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
{
return PG_SIZE;
}
int
__rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
{
- rnd_fill(buf, len);
+
//
rnd_fill(buf, len);
return len;
}
void
devbuiltin_init_rand()
{
return len;
}
void
devbuiltin_init_rand()
{
- if (!rnd_is_supported()) {
+ // TODO rnd device need better abstraction
+ if (1) {
kprintf(KWARN "not supported.\n");
return;
}
kprintf(KWARN "not supported.\n");
return;
}