Made Open() syscall work (badly)

This commit is contained in:
2024-08-26 14:43:12 +02:00
parent 105b58a684
commit 9388457774
6 changed files with 59 additions and 48 deletions
+3 -2
View File
@@ -6,6 +6,8 @@
#include <disk/disk.h>
#include <stdint.h>
#define MAX_OPEN_FILES 256
superblock_t* impl_superblock = (superblock_t*)SUPERBLOCK_LOC;
inode_t* getInode(char* path, dirEntry_t* dentries) {
@@ -13,8 +15,7 @@ inode_t* getInode(char* path, dirEntry_t* dentries) {
if (strcmp(dentries->name, path) == 0) break;
dentries++;
}
if (dentries->name[0] == '\0') return NULL;
if (dentries->name[0] == '\0') { return NULL; }
inode_t* inode = (inode_t*)BOOT_FIRST_INODE_LOC + dentries->id;