Create libioutil, implement a filewriter
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m21s

This commit is contained in:
2026-03-02 22:47:10 +01:00
parent 27afd57427
commit 58c515e90a
28 changed files with 231 additions and 29 deletions

View File

@@ -71,8 +71,8 @@ int read_dir_entry (const char* path, struct dir_entry* entry, size_t entry_num)
int create_file (const char* path) { return (int)do_syscall (SYS_CREATE_FILE, path); }
int write_file (const char* path, size_t off, uint8_t* buffer, size_t size) {
return (int)do_syscall (SYS_WRITE_FILE, path, off, buffer, size);
int write_file (const char* path, size_t off, uint8_t* buffer, size_t size, uint32_t flags) {
return (int)do_syscall (SYS_WRITE_FILE, path, off, buffer, size, flags);
}
int wait_for_pid (int pid) { return (int)do_syscall (SYS_WAIT_FOR_PID, pid); }

View File

@@ -6,15 +6,6 @@
#include <stddef.h>
#include <stdint.h>
#if defined(__x86_64__)
#define PAGE_SIZE 4096
#endif
#define MAP_PRESENT (1 << 0)
#define MAP_RW (1 << 1)
#define MAP_USER (1 << 2)
#define MAP_FLAGS (MAP_PRESENT | MAP_USER)
/* Quit the current running process */
int quit (void);
@@ -85,7 +76,7 @@ int read_dir_entry (const char* path, struct dir_entry* entry, size_t entry_num)
int create_file (const char* path);
/* write to a file */
int write_file (const char* path, size_t off, uint8_t* buffer, size_t size);
int write_file (const char* path, size_t off, uint8_t* buffer, size_t size, uint32_t flags);
/* wait for process */
int wait_for_pid (int pid);