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
Levin Zimmermann
go-fuse
Commits
8f980c13
Commit
8f980c13
authored
Aug 14, 2010
by
Ivan Krasin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse.Error -> fuse.Status
parent
b72bba42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
fuse/fuse.go
fuse/fuse.go
+6
-6
fuse/fuse_test.go
fuse/fuse_test.go
+3
-3
fuse/types.go
fuse/types.go
+6
-6
No files found.
fuse/fuse.go
View file @
8f980c13
...
...
@@ -14,9 +14,9 @@ const (
)
type
FileSystem
interface
{
List
(
parent
string
)
(
names
[]
string
,
code
Error
)
Lookup
(
parent
,
filename
string
)
(
out
*
Attr
,
code
Error
)
GetAttr
(
path
string
,
id
*
Identity
,
flags
uint32
)
(
out
*
AttrOut
,
code
Error
)
List
(
parent
string
)
(
names
[]
string
,
code
Status
)
Lookup
(
parent
,
filename
string
)
(
out
*
Attr
,
code
Status
)
GetAttr
(
path
string
,
id
*
Identity
,
flags
uint32
)
(
out
*
AttrOut
,
code
Status
)
}
type
Mounted
interface
{
...
...
@@ -105,7 +105,7 @@ func dispatch(fs FileSystem, in_data []byte, c *managerClient, toW chan [][]byte
toW
<-
out
}
func
serialize
(
h
*
InHeader
,
res
Error
,
out
interface
{})
(
data
[][]
byte
,
err
os
.
Error
)
{
func
serialize
(
h
*
InHeader
,
res
Status
,
out
interface
{})
(
data
[][]
byte
,
err
os
.
Error
)
{
b
:=
new
(
bytes
.
Buffer
)
out_data
:=
make
([]
byte
,
0
)
fmt
.
Printf
(
"OpCode: %v result: %v
\n
"
,
h
.
Opcode
,
res
)
...
...
@@ -122,7 +122,7 @@ func serialize(h *InHeader, res Error, out interface{}) (data [][]byte, err os.E
fmt
.
Printf
(
"out_data: %v, len(out_data): %d, SizeOfOutHeader: %d
\n
"
,
out_data
,
len
(
out_data
),
SizeOfOutHeader
)
var
hout
OutHeader
hout
.
Unique
=
h
.
Unique
hout
.
Error
=
int32
(
res
)
hout
.
Status
=
res
hout
.
Length
=
uint32
(
len
(
out_data
)
+
SizeOfOutHeader
)
b
=
new
(
bytes
.
Buffer
)
err
=
binary
.
Write
(
b
,
binary
.
LittleEndian
,
&
hout
)
...
...
@@ -346,7 +346,7 @@ type managerResponse struct {
fh
uint64
dirReq
chan
*
dirRequest
err
os
.
Error
code
Error
code
Status
attr
*
Attr
path
string
}
...
...
fuse/fuse_test.go
View file @
8f980c13
...
...
@@ -20,13 +20,13 @@ var (
type
testFuse
struct
{}
func
(
fs
*
testFuse
)
GetAttr
(
path
string
,
id
*
Identity
,
flags
uint32
)
(
out
*
AttrOut
,
code
Error
)
{
func
(
fs
*
testFuse
)
GetAttr
(
path
string
,
id
*
Identity
,
flags
uint32
)
(
out
*
AttrOut
,
code
Status
)
{
out
=
new
(
AttrOut
)
out
.
Mode
=
S_IFDIR
return
}
func
(
fs
*
testFuse
)
Lookup
(
parent
,
filename
string
)
(
out
*
Attr
,
code
Error
)
{
func
(
fs
*
testFuse
)
Lookup
(
parent
,
filename
string
)
(
out
*
Attr
,
code
Status
)
{
fmt
.
Printf
(
"testFuse.Lookup: %s
\n
"
,
path
.
Join
(
parent
,
filename
))
out
=
new
(
Attr
)
out
.
Mode
=
S_IFDIR
...
...
@@ -34,7 +34,7 @@ func (fs *testFuse) Lookup(parent, filename string) (out *Attr, code Error) {
return
}
func
(
fs
*
testFuse
)
List
(
dir
string
)
(
names
[]
string
,
code
Error
)
{
func
(
fs
*
testFuse
)
List
(
dir
string
)
(
names
[]
string
,
code
Status
)
{
names
=
testFileNames
return
}
...
...
fuse/types.go
View file @
8f980c13
...
...
@@ -130,13 +130,13 @@ const (
S_IFDIR
=
syscall
.
S_IFDIR
)
type
Error
int32
type
Status
int32
const
(
OK
=
Error
(
0
)
EIO
=
Error
(
syscall
.
EIO
)
ENOSYS
=
Error
(
syscall
.
ENOSYS
)
ENODATA
=
Error
(
syscall
.
ENODATA
)
OK
=
Status
(
0
)
EIO
=
Status
(
syscall
.
EIO
)
ENOSYS
=
Status
(
syscall
.
ENOSYS
)
ENODATA
=
Status
(
syscall
.
ENODATA
)
)
type
Opcode
int
...
...
@@ -507,7 +507,7 @@ const SizeOfOutHeader = 16
type
OutHeader
struct
{
Length
uint32
Error
int32
Status
Status
Unique
uint64
}
...
...
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