diff options
author | Zheng Da <zhengda1936@gmail.com> | 2009-12-06 05:26:23 +0100 |
---|---|---|
committer | Zheng Da <zhengda1936@gmail.com> | 2009-12-06 05:26:23 +0100 |
commit | 8a6d48c0542876eb3acfc0970c0ab7872db08d5f (patch) | |
tree | 496e78bc728317ea779781b92f897d16936ee231 /libdde_linux26/lib/src/arch/l4/mm-helper.c | |
parent | b4bffcfcdf3ab7a55d664e9aa5907f88da503f38 (diff) |
check in the original version of dde linux26.
Diffstat (limited to 'libdde_linux26/lib/src/arch/l4/mm-helper.c')
-rw-r--r-- | libdde_linux26/lib/src/arch/l4/mm-helper.c | 45 |
1 files changed, 45 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..68c0213b --- /dev/null +++ b/libdde_linux26/lib/src/arch/l4/mm-helper.c @@ -0,0 +1,45 @@ +/* Linux */ +#include <linux/gfp.h> +#include <linux/string.h> +#include <asm/page.h> + +/* DDEKit */ +#include <l4/dde/ddekit/memory.h> +#include <l4/dde/ddekit/assert.h> +#include <l4/dde/ddekit/panic.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; } |