user|sys_seek() now returns an off_t.

Changed the fd_close() call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@267 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2002-07-17 08:01:40 +00:00
parent 243d156e21
commit b79d207dc2
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ int sys_open(const char *path, int omode);
int sys_close(int fd); int sys_close(int fd);
ssize_t sys_read(int fd, void *buf, off_t pos, size_t len); 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); 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_ioctl(int fd, ulong op, void *buf, size_t length);
int sys_unlink(const char *path); int sys_unlink(const char *path);
int sys_rename(const char *oldpath, const char *newpath); int sys_rename(const char *oldpath, const char *newpath);
+3 -2
View File
@@ -29,13 +29,13 @@ struct fd_ops {
char *fs_name; char *fs_name;
ssize_t (*fd_read) (struct file_descriptor *, void *buffer, off_t pos, size_t *length); 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); 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_ioctl)(struct file_descriptor *, ulong op, void *buffer, size_t length);
// int (*fd_poll)(struct file_descriptor *, int); // 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_read_dir)(struct file_descriptor *,struct dirent *buffer,size_t bufferSize,uint32 *_count);
status_t (*fd_rewind_dir)(struct file_descriptor *); status_t (*fd_rewind_dir)(struct file_descriptor *);
int (*fd_stat)(struct file_descriptor *, struct stat *); 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 *); void (*fd_free)(struct file_descriptor *);
}; };
@@ -45,6 +45,7 @@ struct file_descriptor {
struct fd_ops *ops; struct fd_ops *ops;
struct vnode *vnode; struct vnode *vnode;
void *cookie; void *cookie;
int32 dummy;
}; };
+3 -3
View File
@@ -76,7 +76,7 @@ struct fs_calls {
int (*fs_free_cookie)(fs_cookie fs, fs_vnode v, file_cookie cookie); 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_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); 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 */ /* directory operations */
int (*fs_create_dir)(fs_cookie fs, fs_vnode dir, const char *name, int perms, vnode_id *new_vnid); 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(const char *path, int omode);
int sys_open_dir(const char *path); int sys_open_dir(const char *path);
int sys_fsync(int fd); 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(const char *path, int omode, int perms);
int sys_create_dir(const char *path, int perms); int sys_create_dir(const char *path, int perms);
int sys_unlink(const char *path); 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(const char *path, int omode);
int user_open_dir(const char *path); int user_open_dir(const char *path);
int user_fsync(int fd); 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(const char *path, int omode, int perms);
int user_create_dir(const char *path, int perms); int user_create_dir(const char *path, int perms);
int user_unlink(const char *path); int user_unlink(const char *path);