Redesign VFS around handles

This commit is contained in:
2026-02-22 13:57:41 +01:00
parent b571e2dbd3
commit 85872b856b
10 changed files with 210 additions and 196 deletions

View File

@@ -43,14 +43,14 @@ int exec (const char* path) { return (int)do_syscall (SYS_EXEC, path); }
int open (const char* path) { return (int)do_syscall (SYS_OPEN, path); }
int close (const char* path) { return (int)do_syscall (SYS_CLOSE, path); }
int close (int handle) { return (int)do_syscall (SYS_CLOSE, handle); }
int read (const char* path, size_t off, uint8_t* buffer, size_t size) {
return (int)do_syscall (SYS_READ, path, off, buffer, size);
int read (int handle, size_t off, uint8_t* buffer, size_t size) {
return (int)do_syscall (SYS_READ, handle, off, buffer, size);
}
int describe (const char* path, struct desc* desc) {
return (int)do_syscall (SYS_DESCRIBE, path, desc);
int describe (int handle, struct desc* desc) {
return (int)do_syscall (SYS_DESCRIBE, handle, desc);
}
int mail_send (int pgid, void* mesg, size_t mesg_size) {