vfs: check userland buffers before reading them.
[haiku.git] / src / system / boot / loader / file_systems / bfs / Link.h
blob301a9b8a830258faaaf6ecfce44821228c9872dd
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
4 */
5 #ifndef LINK_H
6 #define LINK_H
9 #include <boot/vfs.h>
11 #include "File.h"
14 namespace BFS {
16 class Link : public File {
17 public:
18 Link(Volume &volume, block_run run);
19 Link(Volume &volume, off_t id);
20 Link(const Stream &stream);
22 status_t InitCheck();
24 virtual status_t ReadLink(char *buffer, size_t bufferSize);
26 virtual ssize_t ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize);
27 virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize);
29 virtual int32 Type() const;
32 } // namespace BFS
34 #endif /* FILE_H */