Finished adding untested bare functionality vfs

Finished adding untested shm syscalls.
Finished adding untested l4 send/recv helpers

Everything compiles. Now going to fix lots of bugs ;-)
This commit is contained in:
Bahadir Balban
2008-02-03 17:42:38 +00:00
parent 05e9028e90
commit cab2e8bdd3
51 changed files with 1661 additions and 227 deletions

36
tasks/fs0/src/vfs.c Normal file
View File

@@ -0,0 +1,36 @@
/*
* High-level vfs implementation.
*
* Copyright (C) 2008 Bahadir Balban
*/
#include <fs.h>
#include <vfs.h>
struct vnode *vfs_lookup(struct superblock *sb, char *path)
{
/* If it's just / we already got it. */
if (!strcmp(path, "/"))
return sb->root;
return sb->root->ops.lookup(sb->root, path);
}
/*
* /
* /boot
* /boot/images/mm0.axf
* /boot/images/fs0.axf
* /boot/images/test0.axf
* /file.txt
*/
struct vfs_mountpoint vfs_root;
int vfs_mount_root(struct superblock *sb)
{
/* Lookup the root vnode of this superblock */
vfs_root.pivot = vfs_lookup(sb, "/");
vfs_root.sb = sb;
return 0;
}