Added a sys_write_link() function.

Added a "mode" parameter to the sys_create_symlink() function.
Added an open_mode to the file_descriptor struct.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@591 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-08-05 05:31:32 +00:00
parent fbc9a56c28
commit dfa8e8ef78
2 changed files with 7 additions and 4 deletions

View File

@ -26,7 +26,7 @@ struct io_context {
};
struct fd_ops {
char *fs_name;
char *fs_name; // can be removed, it's not used anywhere
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);
off_t (*fd_seek)(struct file_descriptor *, off_t pos, int seekType);
@ -45,6 +45,7 @@ struct file_descriptor {
struct fd_ops *ops;
struct vnode *vnode;
void *cookie;
int32 open_mode;
};

View File

@ -58,7 +58,9 @@ struct fs_calls {
int (*fs_fsync)(fs_cookie fs, fs_vnode v);
int (*fs_read_link)(fs_cookie fs, fs_vnode link, char *buffer, size_t bufferSize);
int (*fs_symlink)(fs_cookie fs, fs_vnode dir, const char *name, const char *path);
int (*fs_write_link)(fs_cookie fs, fs_vnode link, char *toPath);
int (*fs_symlink)(fs_cookie fs, fs_vnode dir, const char *name, const char *path, int mode);
int (*fs_unlink)(fs_cookie fs, fs_vnode dir, const char *name);
int (*fs_rename)(fs_cookie fs, fs_vnode olddir, const char *oldname, fs_vnode newdir, const char *newname);
@ -159,7 +161,7 @@ int sys_create(const char *path, int omode, int perms);
int sys_create_dir_entry_ref(dev_t device, ino_t inode, const char *name, int perms);
int sys_create_dir(const char *path, int perms);
int sys_read_link(const char *path, char *buffer, size_t bufferSize);
int sys_create_symlink(const char *path, const char *toPath);
int sys_create_symlink(const char *path, const char *toPath, int mode);
int sys_unlink(const char *path);
int sys_rename(const char *oldpath, const char *newpath);
int sys_read_stat(const char *path, bool traverseLink, struct stat *stat);
@ -183,7 +185,7 @@ int user_create(const char *path, int omode, int perms);
int user_create_dir_entry_ref(dev_t device, ino_t inode, const char *name, int perms);
int user_create_dir(const char *path, int perms);
int user_read_link(const char *path, char *buffer, size_t bufferSize);
int user_create_symlink(const char *path, const char *toPath);
int user_create_symlink(const char *path, const char *toPath, int mode);
int user_unlink(const char *path);
int user_rename(const char *oldpath, const char *newpath);
int user_read_stat(const char *path, bool traverseLink, struct stat *stat);