blob: 68c0213bb5cf9c7ccedaf87f545b779444c582cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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; }
|