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
c0a73064
Commit
c0a73064
authored
May 01, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return Status from File.GetAttr too.
parent
55280611
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
fuse/default.go
fuse/default.go
+2
-2
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+2
-2
fuse/loopback.go
fuse/loopback.go
+3
-3
fuse/pathops.go
fuse/pathops.go
+5
-2
fuse/types.go
fuse/types.go
+4
-3
No files found.
fuse/default.go
View file @
c0a73064
...
@@ -152,8 +152,8 @@ func (me *DefaultFile) Release() {
...
@@ -152,8 +152,8 @@ func (me *DefaultFile) Release() {
}
}
func
(
me
*
DefaultFile
)
GetAttr
()
*
Attr
{
func
(
me
*
DefaultFile
)
GetAttr
()
(
*
Attr
,
Status
)
{
return
nil
return
nil
,
ENOSYS
}
}
func
(
me
*
DefaultFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DefaultFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
...
...
fuse/fsetattr_test.go
View file @
c0a73064
...
@@ -46,9 +46,9 @@ func (me *MutableDataFile) getAttr() *Attr {
...
@@ -46,9 +46,9 @@ func (me *MutableDataFile) getAttr() *Attr {
return
a
return
a
}
}
func
(
me
*
MutableDataFile
)
GetAttr
()
*
Attr
{
func
(
me
*
MutableDataFile
)
GetAttr
()
(
*
Attr
,
Status
)
{
me
.
GetAttrCalled
=
true
me
.
GetAttrCalled
=
true
return
me
.
getAttr
()
return
me
.
getAttr
()
,
OK
}
}
func
(
me
*
MutableDataFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
MutableDataFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
...
...
fuse/loopback.go
View file @
c0a73064
...
@@ -208,12 +208,12 @@ func (me *LoopbackFile) Chown(uid uint32, gid uint32) Status {
...
@@ -208,12 +208,12 @@ func (me *LoopbackFile) Chown(uid uint32, gid uint32) Status {
return
OsErrorToErrno
(
me
.
file
.
Chown
(
int
(
uid
),
int
(
gid
)))
return
OsErrorToErrno
(
me
.
file
.
Chown
(
int
(
uid
),
int
(
gid
)))
}
}
func
(
me
*
LoopbackFile
)
GetAttr
()
*
Attr
{
func
(
me
*
LoopbackFile
)
GetAttr
()
(
*
Attr
,
Status
)
{
fi
,
err
:=
me
.
file
.
Stat
()
fi
,
err
:=
me
.
file
.
Stat
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
return
nil
,
OsErrorToErrno
(
err
)
}
}
a
:=
&
Attr
{}
a
:=
&
Attr
{}
CopyFileInfo
(
fi
,
a
)
CopyFileInfo
(
fi
,
a
)
return
a
return
a
,
OK
}
}
fuse/pathops.go
View file @
c0a73064
...
@@ -76,9 +76,12 @@ func (me *FileSystemConnector) Forget(h *InHeader, input *ForgetIn) {
...
@@ -76,9 +76,12 @@ func (me *FileSystemConnector) Forget(h *InHeader, input *ForgetIn) {
func
(
me
*
FileSystemConnector
)
GetAttr
(
header
*
InHeader
,
input
*
GetAttrIn
)
(
out
*
AttrOut
,
code
Status
)
{
func
(
me
*
FileSystemConnector
)
GetAttr
(
header
*
InHeader
,
input
*
GetAttrIn
)
(
out
*
AttrOut
,
code
Status
)
{
if
input
.
Flags
&
FUSE_GETATTR_FH
!=
0
{
if
input
.
Flags
&
FUSE_GETATTR_FH
!=
0
{
f
,
mount
:=
me
.
getFile
(
input
.
Fh
)
f
,
mount
:=
me
.
getFile
(
input
.
Fh
)
attr
:=
f
.
GetAttr
()
attr
,
err
:=
f
.
GetAttr
()
if
err
!=
OK
&&
err
!=
ENOSYS
{
return
nil
,
err
}
if
attr
!=
nil
{
if
attr
!=
nil
{
out
=
&
AttrOut
{
out
=
&
AttrOut
{
Attr
:
*
attr
,
Attr
:
*
attr
,
}
}
...
...
fuse/types.go
View file @
c0a73064
...
@@ -522,11 +522,12 @@ type File interface {
...
@@ -522,11 +522,12 @@ type File interface {
Release
()
Release
()
Fsync
(
*
FsyncIn
)
(
code
Status
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
GetAttr
()
*
Attr
GetAttr
()
(
*
Attr
,
Status
)
Utimens
(
atimeNs
uint64
,
mtimeNs
uint64
)
Status
Truncate
(
size
uint64
)
Status
Chown
(
uid
uint32
,
gid
uint32
)
Status
Chown
(
uid
uint32
,
gid
uint32
)
Status
Chmod
(
perms
uint32
)
Status
Chmod
(
perms
uint32
)
Status
Utimens
(
atimeNs
uint64
,
mtimeNs
uint64
)
Status
Truncate
(
size
uint64
)
Status
}
}
type
RawDir
interface
{
type
RawDir
interface
{
...
...
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