vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / file_systems / ntfs / attributes.h
blob4e29b4d5742562d9b2819325a82029c117140685
1 /*
2 Copyright 1999-2001, Be Incorporated. All Rights Reserved.
3 This file may be used under the terms of the Be Sample Code License.
4 */
5 /* attributes.h
6 * handles mime type information for ntfs
7 * gets/sets mime information in vnode
8 */
9 #ifndef NTFS_ATTRIBUTES_H
10 #define NTFS_ATTRIBUTES_H
13 #include <fs_attr.h>
15 #include "ntfs.h"
17 status_t fs_create_attrib(fs_volume *_vol, fs_vnode *_node, const char* name,
18 uint32 type, int openMode, void** _cookie);
19 status_t fs_open_attrib_dir(fs_volume *_vol, fs_vnode *_node, void **_cookie);
20 status_t fs_close_attrib_dir(fs_volume *_vol, fs_vnode *_node, void *_cookie);
21 status_t fs_free_attrib_dir_cookie(fs_volume *_vol, fs_vnode *_node,
22 void *_cookie);
23 status_t fs_rewind_attrib_dir(fs_volume *_vol, fs_vnode *_node, void *_cookie);
24 status_t fs_read_attrib_dir(fs_volume *_vol, fs_vnode *_node, void *_cookie,
25 struct dirent *buf, size_t bufsize, uint32 *num);
26 status_t fs_open_attrib(fs_volume *_vol, fs_vnode *_node, const char *name,
27 int openMode, void **_cookie);
28 status_t fs_close_attrib(fs_volume *_vol, fs_vnode *_node, void *cookie);
29 status_t fs_free_attrib_cookie(fs_volume *_vol, fs_vnode *_node, void *cookie);
30 status_t fs_read_attrib_stat(fs_volume *_vol, fs_vnode *_node, void *cookie,
31 struct stat *stat);
32 status_t fs_read_attrib(fs_volume *_vol, fs_vnode *_node, void *cookie,
33 off_t pos, void *buffer, size_t *_length);
34 status_t fs_write_attrib(fs_volume *_vol, fs_vnode *_node, void *cookie,
35 off_t pos, const void *buffer, size_t *_length);
36 status_t fs_remove_attrib(fs_volume *_vol, fs_vnode *_node, const char* name);
38 #endif // NTFS_ATTRIBUTES_H