summaryrefslogtreecommitdiff
path: root/boot/efi/bind.c
blob: 53522a59a8f5d4c4ae1fe848ec5162106bfeff69 (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
46
47
48
49
50
51
52
#include "kjarna_efi.h"

int open(const char *path, int flags, int mode)
{
	return efi_open(path, flags, mode);
}

int close(int fd)
{
	return efi_close(fd);
}

off_t lseek(int fd, off_t offset, int whence)
{
	return efi_lseek(fd, offset, whence);
}

ssize_t read(int fd, void *buffer, size_t length)
{
	return efi_read(fd, buffer, length);
}

ssize_t write(int fd, const void *buffer, size_t length)
{
	return efi_write(fd, buffer, length);
}

void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
{
	return efi_mmap(addr, length, prot, flags, fd, offset);
}

int munmap(void *addr, size_t length)
{
	return efi_munmap(addr, length);
}

void *malloc(size_t size)
{
	return efi_alloc_pool(size);
}

void *calloc(size_t count, size_t size)
{
	return efi_calloc_pool(count, size);
}

void free(void *block)
{
	efi_free_pool(block);
}