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
58233848
Commit
58233848
authored
Apr 02, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move StatfsOut and Kstatfs to raw.
parent
75c95c33
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
24 deletions
+28
-24
fuse/loopback.go
fuse/loopback.go
+3
-1
fuse/typeprint.go
fuse/typeprint.go
+0
-7
fuse/types.go
fuse/types.go
+1
-16
raw/print.go
raw/print.go
+6
-0
raw/types.go
raw/types.go
+18
-0
No files found.
fuse/loopback.go
View file @
58233848
...
...
@@ -12,6 +12,8 @@ import (
"path/filepath"
"syscall"
"time"
"github.com/hanwen/go-fuse/raw"
)
var
_
=
fmt
.
Println
...
...
@@ -187,7 +189,7 @@ func (me *LoopbackFileSystem) StatFs(name string) *StatfsOut {
err
:=
syscall
.
Statfs
(
me
.
GetPath
(
name
),
&
s
)
if
err
==
nil
{
return
&
StatfsOut
{
Kstatfs
{
raw
.
Kstatfs
{
Blocks
:
s
.
Blocks
,
Bsize
:
uint32
(
s
.
Bsize
),
Bfree
:
s
.
Bfree
,
...
...
fuse/typeprint.go
View file @
58233848
...
...
@@ -41,13 +41,6 @@ func (me *ReadIn) String() string {
raw
.
FlagString
(
raw
.
OpenFlagNames
,
int
(
me
.
Flags
),
"RDONLY"
))
}
func
(
me
*
Kstatfs
)
String
()
string
{
return
fmt
.
Sprintf
(
"{b%d f%d fs%d ff%d bs%d nl%d frs%d}"
,
me
.
Blocks
,
me
.
Bfree
,
me
.
Bavail
,
me
.
Files
,
me
.
Ffree
,
me
.
Bsize
,
me
.
NameLen
,
me
.
Frsize
)
}
func
(
me
*
WithFlags
)
String
()
string
{
return
fmt
.
Sprintf
(
"File %s (%s) %s %s"
,
me
.
File
,
me
.
Description
,
raw
.
FlagString
(
raw
.
OpenFlagNames
,
int
(
me
.
OpenFlags
),
"O_RDONLY"
),
...
...
fuse/types.go
View file @
58233848
...
...
@@ -48,18 +48,7 @@ type Owner raw.Owner
type
Context
raw
.
Context
type
Kstatfs
struct
{
Blocks
uint64
Bfree
uint64
Bavail
uint64
Files
uint64
Ffree
uint64
Bsize
uint32
NameLen
uint32
Frsize
uint32
Padding
uint32
Spare
[
6
]
uint32
}
type
StatfsOut
raw
.
StatfsOut
const
(
READ_LOCKOWNER
=
(
1
<<
1
)
...
...
@@ -90,10 +79,6 @@ type WriteIn struct {
Padding
uint32
}
type
StatfsOut
struct
{
Kstatfs
}
type
Dirent
struct
{
Ino
uint64
Off
uint64
...
...
raw/print.go
View file @
58233848
...
...
@@ -196,3 +196,9 @@ func (me *CreateOut) String() string {
return
fmt
.
Sprintf
(
"{%v %v}"
,
&
me
.
EntryOut
,
&
me
.
OpenOut
)
}
func
(
me
*
Kstatfs
)
String
()
string
{
return
fmt
.
Sprintf
(
"{b%d f%d fs%d ff%d bs%d nl%d frs%d}"
,
me
.
Blocks
,
me
.
Bfree
,
me
.
Bavail
,
me
.
Files
,
me
.
Ffree
,
me
.
Bsize
,
me
.
NameLen
,
me
.
Frsize
)
}
raw/types.go
View file @
58233848
...
...
@@ -367,3 +367,21 @@ type InHeader struct {
Context
Padding
uint32
}
type
Kstatfs
struct
{
Blocks
uint64
Bfree
uint64
Bavail
uint64
Files
uint64
Ffree
uint64
Bsize
uint32
NameLen
uint32
Frsize
uint32
Padding
uint32
Spare
[
6
]
uint32
}
type
StatfsOut
struct
{
Kstatfs
}
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