Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
2c94dbd0
Commit
2c94dbd0
authored
Oct 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4bc654d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
wcfs/internal/wcfs_misc.h
wcfs/internal/wcfs_misc.h
+8
-4
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+2
-2
No files found.
wcfs/internal/wcfs_misc.h
View file @
2c94dbd0
...
...
@@ -55,10 +55,14 @@ namespace os {
// os::File mimics os.File from Go.
// its operations return error with full file context.
struct
File
{
int
fd
;
string
path
;
class
File
{
int
_fd
;
string
_path
;
public:
// XXX empty ctor -> fd=-1, path=?
int
fd
();
string
name
();
error
close
();
error
stat
(
struct
stat
*
st
);
};
...
...
wcfs/internal/wcfs_virtmem.cpp
View file @
2c94dbd0
...
...
@@ -79,7 +79,7 @@ struct WCFS {
Conn
*
connect
(
Tid
at
);
string
_path
(
const
string
&
obj
);
tuple
<
os
::
File
,
error
>
_open
(
const
string
&
path
/*, XXX mode*/
);
tuple
<
os
::
File
,
error
>
_open
(
const
string
&
path
,
int
mode
=
O_RDONLY
);
};
// Conn represents logical connection that provides view of data on wcfs
...
...
@@ -289,7 +289,7 @@ string WCFS::_path(const string &obj) {
return
wc
->
mountpoint
+
"/"
+
obj
;
}
tuple
<
os
::
File
,
error
>
WCFS
::
_open
(
const
string
&
path
,
int
flags
=
O_RDONLY
)
{
tuple
<
os
::
File
,
error
>
WCFS
::
_open
(
const
string
&
path
,
int
flags
)
{
WCFS
*
wc
=
this
;
string
path_
=
wc
->
_path
(
path
);
return
os
::
open
(
path_
,
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment