xref: /haiku/src/system/boot/loader/file_systems/bfs/Link.cpp (revision 3cb015b1ee509d69c643506e8ff573808c86dcfc)
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the OpenBeOS License.
4 */
5 
6 
7 #include "Link.h"
8 
9 #include <util/kernel_cpp.h>
10 
11 
12 namespace BFS {
13 
14 Link::Link(Volume &volume, block_run run)
15 	: File(volume, run)
16 {
17 }
18 
19 
20 Link::Link(Volume &volume, off_t id)
21 	: File(volume, id)
22 {
23 }
24 
25 
26 Link::Link(const Stream &stream)
27 	: File(stream)
28 {
29 }
30 
31 
32 status_t
33 Link::InitCheck()
34 {
35 	return fStream.InitCheck();
36 }
37 
38 
39 status_t
40 Link::ReadLink(char *buffer, size_t bufferSize)
41 {
42 	return fStream.ReadLink(buffer, bufferSize);
43 }
44 
45 
46 ssize_t
47 Link::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize)
48 {
49 	return B_NOT_ALLOWED;
50 }
51 
52 
53 ssize_t
54 Link::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize)
55 {
56 	return B_NOT_ALLOWED;
57 }
58 
59 
60 int32
61 Link::Type() const
62 {
63 	return S_IFLNK;
64 }
65 
66 }	// namespace BFS
67