Major code cleanup and reorganisation.

Fixed many bugs.
Now, the vfs_ prefix is for functions that are called by other parts of the
kernel. file_ is for file related stuff, dir_ for directory related, and
common_ for both, fs_ for general file system stuff.
Put all prefixed functions together in the source.
Implemented (currently without a user/sys call) opening/creating of entry_refs,
and node_refs (the latter for opening directories only).
Moved vfs_dup(), and vfs_dup2() to fd.c, fd_dup(), and fd_dup2().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@351 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2002-07-20 00:16:12 +00:00
parent 6ec6552ee4
commit 071f62bc36
3 changed files with 1801 additions and 1659 deletions
+5 -7
View File
@@ -162,8 +162,6 @@ int sys_rename(const char *oldpath, const char *newpath);
int sys_write_stat(const char *path, struct stat *stat, int stat_mask);
char *sys_getcwd(char *buf, size_t size);
int sys_setcwd(const char* path);
int sys_dup(int fd);
int sys_dup2(int ofd, int nfd);
/* calls the syscall dispatcher should use for user file I/O */
int user_mount(const char *path, const char *device, const char *fs_name, void *args);
@@ -181,8 +179,6 @@ int user_read_stat(const char *path, struct stat *stat);
int user_write_stat(const char *path, struct stat *stat, int stat_mask);
int user_getcwd(char *buf, size_t size);
int user_setcwd(const char* path);
int user_dup(int fd);
int user_dup2(int ofd, int nfd);
/* fd kernel prototypes (implementation located in fd.c) */
extern ssize_t sys_read(int fd, void *buf, off_t pos, size_t len);
@@ -192,7 +188,8 @@ extern ssize_t sys_read_dir(int fd, struct dirent *buffer, size_t bufferSize, ui
extern status_t sys_rewind_dir(int fd);
extern int sys_read_stat(const char *path, struct stat *stat);
extern int sys_close(int fd);
extern int sys_dup(int fd);
extern int sys_dup2(int ofd, int nfd);
/* fd user prototypes (implementation located in fd.c) */
extern ssize_t user_read(int fd, void *buf, off_t pos, size_t len);
@@ -202,6 +199,8 @@ extern ssize_t user_read_dir(int fd, struct dirent *buffer, size_t bufferSize, u
extern status_t user_rewind_dir(int fd);
extern int user_fstat(int, struct stat *);
extern int user_close(int fd);
extern int user_dup(int fd);
extern int user_dup2(int ofd, int nfd);
/* vfs entry points... */
@@ -209,5 +208,4 @@ extern int user_close(int fd);
}
#endif
#endif
#endif /* _KERNEL_VFS_H */