FS0 compiles now, with a mock-up rootfs.

Having progress on vfs slowly but surely ;-)
This commit is contained in:
Bahadir Balban
2008-01-15 00:34:10 +00:00
parent efd797c678
commit 6bb5b45212
14 changed files with 174 additions and 275 deletions

View File

@@ -22,7 +22,7 @@ struct file_ops {
file_op_t write;
file_op_t close;
file_op_t mmap;
file_op_t seek;
file_op_t lseek;
file_op_t flush;
file_op_t fsync;
};
@@ -52,11 +52,14 @@ struct filesystem;
struct superblock;
struct vnode;
#define VFS_DENTRY_NAME_MAX 512
struct dentry {
int refcnt;
char name[512];
char name[VFS_DENTRY_NAME_MAX];
struct dentry *parent; /* Parent dentry */
struct list_head siblings; /* List of dentries with same parent */
struct list_head child; /* List of dentries with same parent */
struct list_head children; /* List of children dentries */
struct list_head dref_list; /* For vnode's dirent reference list */
struct vnode *vnode; /* The vnode associated with dirent */
struct dentry_ops ops;
};
@@ -70,6 +73,7 @@ struct file {
struct vnode {
unsigned long id; /* Filesystem-wide unique vnode id */
int refcnt; /* Reference counter */
int hardlinks; /* Number of hard links */
struct vnode_ops ops; /* Operations on this vnode */
struct list_head dirents; /* Dirents that refer to this vnode */
struct list_head state_list; /* List for vnode's dirty/clean state */

View File

@@ -15,7 +15,6 @@
struct initdata {
struct bootdesc *bootdesc;
struct block_device *bdev;
};
extern struct initdata initdata;

View File

@@ -0,0 +1,14 @@
/*
* System call function signatures.
*
* Copyright (C) 2007, 2008 Bahadir Balban
*/
#ifndef __FS0_SYSCALLS_H__
#define __FS0_SYSCALLS_H__
int sys_open(l4id_t sender, char *pathname, int flags, u32 mode);
int sys_read(l4id_t sender, int fd, void *buf, int cnt);
int sys_write(l4id_t sender, int fd, void *buf, int cnt);
int sys_lseek(l4id_t sender, int fd, unsigned long offset, int whence);
#endif /* __FS0_SYSCALLS_H__ */