Added some more convenience VFS calls (vfs_stat_vnode(), and vfs_get_vnode_name()).

Removed *_create() and *_create_entry_ref() syscalls - they are now handled by
*_open() and *_open_entry_ref() calls which get another parameter for the permissions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11204 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-02-02 06:20:00 +00:00
parent 76017250df
commit d12de9209a
2 changed files with 13 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004, Haiku Inc. All rights reserved.
* Copyright 2004-2005, Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_SYSCALLS_H
@ -116,8 +116,8 @@ extern dev_t _kern_next_device(int32 *_cookie);
extern status_t _kern_sync(void);
extern status_t _kern_entry_ref_to_path(dev_t device, ino_t inode,
const char *leaf, char *userPath, size_t pathLength);
extern int _kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode);
extern int _kern_open(int fd, const char *path, int omode);
extern int _kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int openMode, int perms);
extern int _kern_open(int fd, const char *path, int openMode, int perms);
extern int _kern_open_dir_entry_ref(dev_t device, ino_t inode, const char *name);
extern int _kern_open_dir(int fd, const char *path);
extern int _kern_open_parent_dir(int fd, char *name,
@ -125,8 +125,6 @@ extern int _kern_open_parent_dir(int fd, char *name,
extern status_t _kern_fcntl(int fd, int op, uint32 argument);
extern status_t _kern_fsync(int fd);
extern off_t _kern_seek(int fd, off_t pos, int seekType);
extern int _kern_create_entry_ref(dev_t device, ino_t inode, const char *uname, int omode, int perms);
extern int _kern_create(const char *path, int omode, int perms);
extern status_t _kern_create_dir_entry_ref(dev_t device, ino_t inode, const char *name, int perms);
extern status_t _kern_create_dir(int fd, const char *path, int perms);
extern status_t _kern_remove_dir(const char *path);

View File

@ -1,10 +1,10 @@
/*
** Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License.
**
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
* Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the NewOS License.
*/
#ifndef _KERNEL_VFS_H
#define _KERNEL_VFS_H
@ -79,6 +79,8 @@ status_t vfs_write_pages(void *vnode, void *cookie, off_t pos, const iovec *vecs
status_t vfs_get_vnode_cache(void *vnode, struct vm_cache_ref **_cache);
status_t vfs_get_file_map( void *_vnode, off_t offset, size_t size, struct file_io_vec *vecs, size_t *_count);
status_t vfs_get_fs_node_from_path(mount_id mountID, const char *path, bool kernel, void **_node);
status_t vfs_stat_vnode(void *_vnode, struct stat *stat);
status_t vfs_get_vnode_name(void *vnode, char *name, size_t nameSize);
/* special module convenience call */
status_t vfs_get_module_path(const char *basePath, const char *moduleName, char *pathBuffer, size_t bufferSize);
@ -101,8 +103,8 @@ dev_t _user_next_device(int32 *_cookie);
status_t _user_sync(void);
status_t _user_entry_ref_to_path(dev_t device, ino_t inode, const char *leaf,
char *userPath, size_t pathLength);
int _user_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode);
int _user_open(int fd, const char *path, int omode);
int _user_open_entry_ref(dev_t device, ino_t inode, const char *name, int openMode, int perms);
int _user_open(int fd, const char *path, int openMode, int perms);
int _user_open_dir_node_ref(dev_t device, ino_t inode);
int _user_open_dir_entry_ref(dev_t device, ino_t inode, const char *uname);
int _user_open_dir(int fd, const char *path);
@ -114,8 +116,6 @@ status_t _user_read_stat(int fd, const char *path, bool traverseLink,
status_t _user_write_stat(int fd, const char *path, bool traverseLink,
const struct stat *stat, size_t statSize, int statMask);
off_t _user_seek(int fd, off_t pos, int seekType);
int _user_create_entry_ref(dev_t device, ino_t inode, const char *uname, int omode, int perms);
int _user_create(const char *path, int omode, int perms);
status_t _user_create_dir_entry_ref(dev_t device, ino_t inode, const char *name, int perms);
status_t _user_create_dir(int fd, const char *path, int perms);
status_t _user_remove_dir(const char *path);