Implemented a syscall to get information about the open file descriptors of all teams.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15991 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -19,6 +19,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
struct dirent;
|
||||
struct fd_info;
|
||||
struct fd_set;
|
||||
struct fs_info;
|
||||
struct iovec;
|
||||
@@ -180,7 +181,8 @@ extern ssize_t _kern_write(int fd, off_t pos, const void *buffer, size_t buffer
|
||||
extern ssize_t _kern_writev(int fd, off_t pos, const struct iovec *vecs,
|
||||
size_t count);
|
||||
extern status_t _kern_ioctl(int fd, ulong cmd, void *data, size_t length);
|
||||
extern ssize_t _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize, uint32 maxCount);
|
||||
extern ssize_t _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize,
|
||||
uint32 maxCount);
|
||||
extern status_t _kern_rewind_dir(int fd);
|
||||
extern status_t _kern_read_stat(int fd, const char *path, bool traverseLink,
|
||||
struct stat *stat, size_t statSize);
|
||||
@@ -192,6 +194,8 @@ extern int _kern_dup(int fd);
|
||||
extern int _kern_dup2(int ofd, int nfd);
|
||||
extern status_t _kern_lock_node(int fd);
|
||||
extern status_t _kern_unlock_node(int fd);
|
||||
extern status_t _kern_get_next_fd_info(team_id team, uint32 *_cookie,
|
||||
struct fd_info *info, size_t infoSize);
|
||||
|
||||
// node monitor functions
|
||||
extern status_t _kern_stop_notifying(port_id port, uint32 token);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2002-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -43,6 +43,12 @@ typedef struct io_context {
|
||||
uint32 max_monitors;
|
||||
} io_context;
|
||||
|
||||
struct fd_info {
|
||||
int number;
|
||||
int32 open_mode;
|
||||
dev_t device;
|
||||
ino_t node;
|
||||
};
|
||||
|
||||
/* macro to allocate a iovec array on the stack */
|
||||
#define IOVECS(name, size) \
|
||||
@@ -111,6 +117,8 @@ status_t _user_read_fs_info(dev_t device, struct fs_info *info);
|
||||
status_t _user_write_fs_info(dev_t device, const struct fs_info *info, int mask);
|
||||
dev_t _user_next_device(int32 *_cookie);
|
||||
status_t _user_sync(void);
|
||||
status_t _user_get_next_fd_info(team_id team, uint32 *cookie, struct fd_info *info,
|
||||
size_t infoSize);
|
||||
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 openMode, int perms);
|
||||
|
||||
Reference in New Issue
Block a user