diff --git a/sys/fs/vfs/file.c b/sys/fs/vfs/file.c index 43b70ce..54163a6 100644 --- a/sys/fs/vfs/file.c +++ b/sys/fs/vfs/file.c @@ -27,8 +27,8 @@ *****************************************************************************************/ -#include #include +#include #include #include #include diff --git a/sys/fs/vfs/stat.c b/sys/fs/vfs/stat.c index 055523a..b57ebc9 100644 --- a/sys/fs/vfs/stat.c +++ b/sys/fs/vfs/stat.c @@ -1,6 +1,7 @@ #include +#include #include -#include +#include int sys_stat(char *path, struct stat *sb, int flags) { int error = 0; @@ -40,15 +41,15 @@ else { sb->st_dev = 0xDEADBEEF; sb->st_ino = fd->ino; - sb->st_mode = fd->inode.ufs2.di_mode; - sb->st_nlink = fd->inode.ufs2.di_nlink; - sb->st_uid = fd->inode.ufs2.di_uid; - sb->st_gid = fd->inode.ufs2.di_gid; + sb->st_mode = fd->inode.u.ufs2_i.di_mode; + sb->st_nlink = fd->inode.u.ufs2_i.di_nlink; + sb->st_uid = fd->inode.u.ufs2_i.di_uid; + sb->st_gid = fd->inode.u.ufs2_i.di_gid; sb->st_rdev = 0xBEEFDEAD; - sb->st_size = fd->inode.ufs2.di_size; - sb->st_atime = fd->inode.ufs2.di_atime; - sb->st_mtime = fd->inode.ufs2.di_mtime; - sb->st_ctime = fd->inode.ufs2.di_ctime; + sb->st_size = fd->inode.u.ufs2_i.di_size; + sb->st_atime = fd->inode.u.ufs2_i.di_atime; + sb->st_mtime = fd->inode.u.ufs2_i.di_mtime; + sb->st_ctime = fd->inode.u.ufs2_i.di_ctime; kprintf("LSTAT(%i): st_ino 0x%X, st_mode: 0x%X, st_uid %i, st_gid %i, st_size: 0x%X", error, sb->st_ino, sb->st_mode, sb->st_uid, sb->st_gid, sb->st_size); fclose(fd); } diff --git a/sys/include/ubixos/sched.h b/sys/include/ubixos/sched.h index ec3a934..8d7a5ea 100644 --- a/sys/include/ubixos/sched.h +++ b/sys/include/ubixos/sched.h @@ -31,12 +31,11 @@ #define _UBIXOS_SCHED_H #include -#include +#include #include #include #include -#include #define NO_GROUP -1 #define NR_GROUPS 32 diff --git a/sys/include/ubixos/wait.h b/sys/include/ubixos/wait.h index 1abbef4..ccd5355 100644 --- a/sys/include/ubixos/wait.h +++ b/sys/include/ubixos/wait.h @@ -1,10 +1,9 @@ #ifndef _UBIXOS_WAIT_H #define _UBIXOS_WAIT_H -#include struct wait_queue { - struct kTask_t *task; +// struct kTask_t *task; struct wait_queue *next; }; diff --git a/sys/include/vfs/file.h b/sys/include/vfs/file.h index 2d90d37..1ed3a44 100644 --- a/sys/include/vfs/file.h +++ b/sys/include/vfs/file.h @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -42,6 +43,8 @@ #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define DEV_BSIZE (1< -#include -//#include - struct super_operations { void (*read_inode)(struct inode *); int (*notify_change)(int flags, struct inode *); @@ -135,46 +129,4 @@ } u; }; -struct inode { - __dev_t i_dev; - unsigned long i_ino; - __mode_t i_mode; - __nlink_t i_nlink; - uid_t i_uid; - gid_t i_gid; - __dev_t i_rdev; - off_t i_size; - time_t i_atime; - time_t i_mtime; - time_t i_ctime; - unsigned long i_blksize; - unsigned long i_blocks; - struct semaphore i_sem; - struct inode_operations * i_op; - struct super_block * i_sb; - struct wait_queue * i_wait; - struct file_lock * i_flock; - struct vm_area_struct * i_mmap; - struct inode * i_next, *i_prev; - struct inode * i_hash_next, *i_hash_prev; - struct inode * i_bound_to, *i_bound_by; - struct inode * i_mount; - struct socket * i_socket; - unsigned short i_count; - unsigned short i_flags; - unsigned char i_lock; - unsigned char i_dirt; - unsigned char i_pipe; - unsigned char i_seek; - unsigned char i_update; - union { - struct pipe_inode_info pipe_i; - struct msdos_inode_info msdos_i; -/* - struct ufs1_dinode ufs1_i; - struct ufs2_dinode ufs2_i; -*/ - } u; -}; - #endif