00001
00002 #include <linux/gfp.h>
00003 #include <linux/string.h>
00004 #include <asm/page.h>
00005
00006
00007 #include <l4/dde/ddekit/memory.h>
00008 #include <l4/dde/ddekit/assert.h>
00009 #include <l4/dde/ddekit/panic.h>
00010
00011 #include "local.h"
00012
00013 int ioprio_best(unsigned short aprio, unsigned short bprio)
00014 {
00015 WARN_UNIMPL;
00016 return 0;
00017 }
00018
00019 void *__alloc_bootmem(unsigned long size, unsigned long align,
00020 unsigned long goal)
00021 {
00022 WARN_UNIMPL;
00023 return 0;
00024 }
00025
00026
00027
00028
00029 ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
00030 const void *from, size_t available)
00031 {
00032 loff_t pos = *ppos;
00033 if (pos < 0)
00034 return -EINVAL;
00035 if (pos > available)
00036 return 0;
00037 if (count > available - pos)
00038 count = available - pos;
00039 memcpy(to, from + pos, count);
00040 *ppos = pos + count;
00041
00042 return count;
00043 }
00044
00045 int capable(int f) { return 1; }