Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
ebb901ab
Commit
ebb901ab
authored
Sep 09, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement Statfs for UnionFs.
parent
e5bc5944
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
unionfs/unionfs.go
unionfs/unionfs.go
+5
-0
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+14
-0
No files found.
unionfs/unionfs.go
View file @
ebb901ab
...
...
@@ -934,6 +934,10 @@ func (me *UnionFs) Name() string {
return
fmt
.
Sprintf
(
"%v"
,
names
)
}
func
(
me
*
UnionFs
)
StatFs
()
*
fuse
.
StatfsOut
{
return
me
.
fileSystems
[
0
]
.
StatFs
()
}
type
UnionFsFile
struct
{
fuse
.
File
layer
int
...
...
@@ -948,3 +952,4 @@ func (me *UnionFsFile) GetAttr() (*os.FileInfo, fuse.Status) {
}
return
fi
,
code
}
unionfs/unionfs_test.go
View file @
ebb901ab
...
...
@@ -968,3 +968,17 @@ func TestFdLeak(t *testing.T) {
t
.
Errorf
(
"/proc/self/fd changed size: after %v before %v"
,
len
(
beforeEntries
),
len
(
afterEntries
))
}
}
func
TestStatFs
(
t
*
testing
.
T
)
{
wd
,
clean
:=
setupUfs
(
t
)
defer
clean
()
s1
:=
syscall
.
Statfs_t
{}
err
:=
syscall
.
Statfs
(
wd
+
"/mount"
,
&
s1
)
if
err
!=
0
{
t
.
Fatal
(
"statfs mnt"
,
err
)
}
if
s1
.
Bsize
==
0
{
t
.
Fatal
(
"Expect blocksize > 0"
)
}
}
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