vfs: check userland buffers before reading them.
[haiku.git] / headers / os / kernel / fs_index.h
blob4db9eb80e14c7a6a369ca18e011144e405971a44
1 /*
2 * Copyright 2002-2003, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _FS_INDEX_H
6 #define _FS_INDEX_H
9 #include <OS.h>
10 #include <dirent.h>
13 typedef struct index_info {
14 uint32 type;
15 off_t size;
16 time_t modification_time;
17 time_t creation_time;
18 uid_t uid;
19 gid_t gid;
20 } index_info;
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 extern int fs_create_index(dev_t device, const char *name, uint32 type, uint32 flags);
28 extern int fs_remove_index(dev_t device, const char *name);
29 extern int fs_stat_index(dev_t device, const char *name, struct index_info *indexInfo);
31 extern DIR *fs_open_index_dir(dev_t device);
32 extern int fs_close_index_dir(DIR *indexDirectory);
33 extern struct dirent *fs_read_index_dir(DIR *indexDirectory);
34 extern void fs_rewind_index_dir(DIR *indexDirectory);
36 #ifdef __cplusplus
38 #endif
40 #endif /* _FS_INDEX_H */