mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
Made Open() syscall work (badly)
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user