diff options
Diffstat (limited to 'libdde_linux26/lib/src/arch/l4/mm-helper.c')
-rw-r--r-- | libdde_linux26/lib/src/arch/l4/mm-helper.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/mm-helper.c b/libdde_linux26/lib/src/arch/l4/mm-helper.c new file mode 100644 index 00000000..cc4cc1d1 --- /dev/null +++ b/libdde_linux26/lib/src/arch/l4/mm-helper.c @@ -0,0 +1,40 @@ +/* Linux */ +#include <linux/gfp.h> +#include <linux/string.h> +#include <asm/page.h> + +#include "local.h" + +int ioprio_best(unsigned short aprio, unsigned short bprio) +{ + WARN_UNIMPL; + return 0; +} + +void *__alloc_bootmem(unsigned long size, unsigned long align, + unsigned long goal) +{ + WARN_UNIMPL; + return 0; +} + +/* + * Stolen from linux-2.6.29/fs/libfs.c + */ +ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, + const void *from, size_t available) +{ + loff_t pos = *ppos; + if (pos < 0) + return -EINVAL; + if (pos > available) + return 0; + if (count > available - pos) + count = available - pos; + memcpy(to, from + pos, count); + *ppos = pos + count; + + return count; +} + +int capable(int f) { return 1; } |