diff --git a/headers/os/kernel/syscalls.h b/headers/os/kernel/syscalls.h index 9dc7c502b1..a34a5d0aff 100755 --- a/headers/os/kernel/syscalls.h +++ b/headers/os/kernel/syscalls.h @@ -33,7 +33,7 @@ int sys_open(const char *path, int omode); int sys_close(int fd); ssize_t sys_read(int fd, void *buf, off_t pos, size_t len); ssize_t sys_write(int fd, const void *buf, off_t pos, size_t len); -int sys_seek(int fd, off_t pos, int seek_type); +off_t sys_seek(int fd, off_t pos, int seek_type); int sys_ioctl(int fd, ulong op, void *buf, size_t length); int sys_unlink(const char *path); int sys_rename(const char *oldpath, const char *newpath); diff --git a/headers/private/kernel/fd.h b/headers/private/kernel/fd.h index 0af90dca15..31b4f507f5 100644 --- a/headers/private/kernel/fd.h +++ b/headers/private/kernel/fd.h @@ -29,13 +29,13 @@ struct fd_ops { char *fs_name; ssize_t (*fd_read) (struct file_descriptor *, void *buffer, off_t pos, size_t *length); ssize_t (*fd_write)(struct file_descriptor *, const void *buffer, off_t pos, size_t *length); - int (*fd_seek)(struct file_descriptor *, off_t pos, int seek_type); + off_t (*fd_seek)(struct file_descriptor *, off_t pos, int seekType); int (*fd_ioctl)(struct file_descriptor *, ulong op, void *buffer, size_t length); // int (*fd_poll)(struct file_descriptor *, int); status_t (*fd_read_dir)(struct file_descriptor *,struct dirent *buffer,size_t bufferSize,uint32 *_count); status_t (*fd_rewind_dir)(struct file_descriptor *); int (*fd_stat)(struct file_descriptor *, struct stat *); - int (*fd_close)(struct file_descriptor *, int, struct io_context *); + int (*fd_close)(struct file_descriptor *); void (*fd_free)(struct file_descriptor *); }; @@ -45,6 +45,7 @@ struct file_descriptor { struct fd_ops *ops; struct vnode *vnode; void *cookie; + int32 dummy; }; diff --git a/headers/private/kernel/vfs.h b/headers/private/kernel/vfs.h index 4eaf3f768e..e69a62db9e 100755 --- a/headers/private/kernel/vfs.h +++ b/headers/private/kernel/vfs.h @@ -76,7 +76,7 @@ struct fs_calls { int (*fs_free_cookie)(fs_cookie fs, fs_vnode v, file_cookie cookie); ssize_t (*fs_read)(fs_cookie fs, fs_vnode v, file_cookie cookie, void *buf, off_t pos, size_t *len); ssize_t (*fs_write)(fs_cookie fs, fs_vnode v, file_cookie cookie, const void *buf, off_t pos, size_t *len); - int (*fs_seek)(fs_cookie fs, fs_vnode v, file_cookie cookie, off_t pos, int st); + off_t (*fs_seek)(fs_cookie fs, fs_vnode v, file_cookie cookie, off_t pos, int seekType); /* directory operations */ int (*fs_create_dir)(fs_cookie fs, fs_vnode dir, const char *name, int perms, vnode_id *new_vnid); @@ -153,7 +153,7 @@ int sys_sync(void); int sys_open(const char *path, int omode); int sys_open_dir(const char *path); int sys_fsync(int fd); -int sys_seek(int fd, off_t pos, int seek_type); +off_t sys_seek(int fd, off_t pos, int seekType); int sys_create(const char *path, int omode, int perms); int sys_create_dir(const char *path, int perms); int sys_unlink(const char *path); @@ -171,7 +171,7 @@ int user_sync(void); int user_open(const char *path, int omode); int user_open_dir(const char *path); int user_fsync(int fd); -int user_seek(int fd, off_t pos, int seek_type); +off_t user_seek(int fd, off_t pos, int seekType); int user_create(const char *path, int omode, int perms); int user_create_dir(const char *path, int perms); int user_unlink(const char *path);