summaryrefslogtreecommitdiff
path: root/boot/efi/bind.c
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2025-01-23 00:24:57 +0000
committerAda Christine <adachristine18@gmail.com>2025-01-23 00:24:57 +0000
commitd855c0a219a180497c2e50f9bc19bfce69b937a6 (patch)
tree1ff8523d41b222fb356fb3404d2a53c26a7d6a3d /boot/efi/bind.c
parentedd52bd1464ee9ae4f0cdf7ff90a20ca175580fe (diff)
it printfs with the efi interface
Diffstat (limited to 'boot/efi/bind.c')
-rw-r--r--boot/efi/bind.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/boot/efi/bind.c b/boot/efi/bind.c
new file mode 100644
index 0000000..53522a5
--- /dev/null
+++ b/boot/efi/bind.c
@@ -0,0 +1,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);
+}
+