* Introduced dedicated syscalls for the deprecated BeOS fs_attr API. Before,

each attribute access needed 3 syscalls, now only one as it should.
* Renamed the new Haiku call fs_open_attr() to fs_fopen_attr(), and added a new
  function fs_open_attr() that takes a path (same semantics as the
  fs_[f]open_attr_dir() functions already present in BeOS).
* Merged former _kern_open_attr(), and _kern_create_attr() into one syscall.
* Cleaned up vfs.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31881 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-07-29 00:34:44 +00:00
parent b237fdf90a
commit 8ae594ffd4
7 changed files with 357 additions and 276 deletions
+14 -11
View File
@@ -1,7 +1,7 @@
/* File System attributes
**
** Distributed under the terms of the OpenBeOS License.
*/
/*
* Copyright 2004-2009, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FS_ATTR_H
#define _FS_ATTR_H
@@ -20,15 +20,18 @@ typedef struct attr_info {
extern "C" {
#endif
extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type, off_t pos, void *buffer, size_t readBytes);
extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type, off_t pos, const void *buffer, size_t readBytes);
extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type,
off_t pos, void *buffer, size_t readBytes);
extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type,
off_t pos, const void *buffer, size_t readBytes);
extern int fs_remove_attr(int fd, const char *attribute);
extern int fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo);
extern int fs_stat_attr(int fd, const char *attribute,
struct attr_info *attrInfo);
// ToDo: the following three functions are not part of the R5 API, and
// are only preliminary - they may change or be removed at any point
//extern int fs_open_attr(const char *path, const char *attribute, uint32 type, int openMode);
extern int fs_open_attr(int fd, const char *attribute, uint32 type, int openMode);
extern int fs_open_attr(const char *path, const char *attribute,
uint32 type, int openMode);
extern int fs_fopen_attr(int fd, const char *attribute, uint32 type,
int openMode);
extern int fs_close_attr(int fd);
extern DIR *fs_open_attr_dir(const char *path);