master
cpp 154 lines 2.68 KB
Raw
1 // Copyright (C) Microsoft Corporation. All rights reserved.
2 #include "precomp.h"
3 #include "p9fid.h"
4
5 namespace p9fs {
6
7 Expected<Qid> Fid::Walk(std::string_view)
8 {
9 return LxError{LX_EINVAL};
10 }
11
12 Expected<std::tuple<UINT64, Qid, StatResult>> Fid::GetAttr(UINT64)
13 {
14 return LxError{LX_EINVAL};
15 }
16
17 LX_INT Fid::SetAttr(UINT32, const StatResult&)
18 {
19 return LX_EINVAL;
20 }
21
22 Expected<Qid> Fid::Open(OpenFlags)
23 {
24 return LxError{LX_EINVAL};
25 }
26
27 Expected<Qid> Fid::Create(std::string_view, OpenFlags, UINT32, UINT32)
28 {
29 return LxError{LX_EINVAL};
30 }
31
32 Expected<Qid> Fid::MkDir(std::string_view, UINT32, UINT32)
33 {
34 return LxError{LX_EINVAL};
35 }
36
37 LX_INT Fid::ReadDir(UINT64, SpanWriter&, bool)
38 {
39 return LX_EINVAL;
40 }
41
42 Task<Expected<UINT32>> Fid::Read(UINT64, gsl::span<gsl::byte>)
43 {
44 co_return LxError{LX_EINVAL};
45 }
46
47 Task<Expected<UINT32>> Fid::Write(UINT64, gsl::span<const gsl::byte>)
48 {
49 co_return LxError{LX_EINVAL};
50 }
51
52 LX_INT Fid::UnlinkAt(std::string_view, UINT32)
53 {
54 return LX_EINVAL;
55 }
56
57 LX_INT Fid::Remove()
58 {
59 return LX_EINVAL;
60 }
61
62 LX_INT Fid::RenameAt(std::string_view, Fid&, std::string_view)
63 {
64 return LX_EINVAL;
65 }
66
67 LX_INT Fid::Rename(Fid&, std::string_view)
68 {
69 return LX_EINVAL;
70 }
71
72 Expected<Qid> Fid::SymLink(std::string_view, std::string_view, UINT32)
73 {
74 return LxError{LX_EINVAL};
75 }
76
77 Expected<Qid> Fid::MkNod(std::string_view, UINT32, UINT32, UINT32, UINT32)
78 {
79 return LxError{LX_EINVAL};
80 }
81
82 LX_INT Fid::Link(std::string_view, Fid&)
83 {
84 return LX_EINVAL;
85 }
86
87 Expected<UINT32> Fid::ReadLink(gsl::span<char>)
88 {
89 return LxError{LX_EINVAL};
90 }
91
92 LX_INT Fid::Fsync()
93 {
94 return LX_EINVAL;
95 }
96
97 Expected<StatFsResult> Fid::StatFs()
98 {
99 return LxError{LX_EINVAL};
100 }
101
102 Expected<LockStatus> Fid::Lock(LockType, UINT32, UINT64, UINT64, UINT32, const std::string_view)
103 {
104 return LxError{LX_EINVAL};
105 }
106
107 Expected<std::tuple<LockType, UINT64, UINT64, UINT32, std::string_view>> Fid::GetLock(LockType, UINT64, UINT64, UINT32, const std::string_view)
108 {
109 return LxError{LX_EINVAL};
110 }
111
112 Expected<std::shared_ptr<XAttrBase>> Fid::XattrWalk(const std::string&)
113 {
114 return LxError{LX_EINVAL};
115 }
116
117 Expected<std::shared_ptr<XAttrBase>> Fid::XattrCreate(const std::string&, UINT64, UINT32)
118 {
119 return LxError{LX_EINVAL};
120 }
121
122 LX_INT Fid::Clunk()
123 {
124 // The default implementation of Clunk returns success rather than error,
125 // because all fid's must support clunk.
126 return {};
127 }
128
129 LX_INT Fid::Access(AccessFlags)
130 {
131 return LX_ENOTSUP;
132 }
133
134 std::shared_ptr<Fid> Fid::Clone() const
135 {
136 THROW_INVALID();
137 }
138
139 bool Fid::IsOnRoot(const std::shared_ptr<const IRoot>&)
140 {
141 THROW_INVALID();
142 }
143
144 bool Fid::IsFile() const
145 {
146 return false;
147 }
148
149 Qid Fid::GetQid() const
150 {
151 THROW_INVALID();
152 }
153
154 } // namespace p9fs