summaryrefslogtreecommitdiff
path: root/boot/efi/fexecve.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/fexecve.c
parentedd52bd1464ee9ae4f0cdf7ff90a20ca175580fe (diff)
it printfs with the efi interface
Diffstat (limited to 'boot/efi/fexecve.c')
-rw-r--r--boot/efi/fexecve.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/boot/efi/fexecve.c b/boot/efi/fexecve.c
new file mode 100644
index 0000000..57cb035
--- /dev/null
+++ b/boot/efi/fexecve.c
@@ -0,0 +1,23 @@
+#include <posix/unistd.h>
+#include <api/elf/elf64.h>
+
+int fexecve(int fd, char *const argv[] char *const envp[])
+{
+ (void)argv;
+ (void)envp;
+
+ if (!elf64_validate_fd(fd, ET_DYN, EM_X86_64))
+ {
+ return -1;
+ }
+
+ size_t memsz;
+
+ if ((memsz = elf64_size_fd(fd)) == 0)
+ {
+ return -1;
+ }
+
+
+}
+