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
76c6deb5
Commit
76c6deb5
authored
Jan 30, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for weekly 2012.01.27.
parent
b6ea0fb7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
fuse/files.go
fuse/files.go
+1
-1
fuse/loopback.go
fuse/loopback.go
+4
-4
fuse/loopback_test.go
fuse/loopback_test.go
+1
-1
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+1
-1
No files found.
fuse/files.go
View file @
76c6deb5
...
@@ -123,7 +123,7 @@ func (me *LoopbackFile) Truncate(size uint64) Status {
...
@@ -123,7 +123,7 @@ func (me *LoopbackFile) Truncate(size uint64) Status {
// futimens missing from 6g runtime.
// futimens missing from 6g runtime.
func
(
me
*
LoopbackFile
)
Chmod
(
mode
uint32
)
Status
{
func
(
me
*
LoopbackFile
)
Chmod
(
mode
uint32
)
Status
{
return
ToStatus
(
me
.
File
.
Chmod
(
mode
))
return
ToStatus
(
me
.
File
.
Chmod
(
os
.
FileMode
(
mode
)
))
}
}
func
(
me
*
LoopbackFile
)
Chown
(
uid
uint32
,
gid
uint32
)
Status
{
func
(
me
*
LoopbackFile
)
Chown
(
uid
uint32
,
gid
uint32
)
Status
{
...
...
fuse/loopback.go
View file @
76c6deb5
...
@@ -101,7 +101,7 @@ func (me *LoopbackFileSystem) Open(name string, flags uint32, context *Context)
...
@@ -101,7 +101,7 @@ func (me *LoopbackFileSystem) Open(name string, flags uint32, context *Context)
}
}
func
(
me
*
LoopbackFileSystem
)
Chmod
(
path
string
,
mode
uint32
,
context
*
Context
)
(
code
Status
)
{
func
(
me
*
LoopbackFileSystem
)
Chmod
(
path
string
,
mode
uint32
,
context
*
Context
)
(
code
Status
)
{
err
:=
os
.
Chmod
(
me
.
GetPath
(
path
),
mode
)
err
:=
os
.
Chmod
(
me
.
GetPath
(
path
),
os
.
FileMode
(
mode
)
)
return
ToStatus
(
err
)
return
ToStatus
(
err
)
}
}
...
@@ -127,7 +127,7 @@ func (me *LoopbackFileSystem) Mknod(name string, mode uint32, dev uint32, contex
...
@@ -127,7 +127,7 @@ func (me *LoopbackFileSystem) Mknod(name string, mode uint32, dev uint32, contex
}
}
func
(
me
*
LoopbackFileSystem
)
Mkdir
(
path
string
,
mode
uint32
,
context
*
Context
)
(
code
Status
)
{
func
(
me
*
LoopbackFileSystem
)
Mkdir
(
path
string
,
mode
uint32
,
context
*
Context
)
(
code
Status
)
{
return
ToStatus
(
os
.
Mkdir
(
me
.
GetPath
(
path
),
mode
))
return
ToStatus
(
os
.
Mkdir
(
me
.
GetPath
(
path
),
os
.
FileMode
(
mode
)
))
}
}
// Don't use os.Remove, it removes twice (unlink followed by rmdir).
// Don't use os.Remove, it removes twice (unlink followed by rmdir).
...
@@ -157,14 +157,14 @@ func (me *LoopbackFileSystem) Access(name string, mode uint32, context *Context)
...
@@ -157,14 +157,14 @@ func (me *LoopbackFileSystem) Access(name string, mode uint32, context *Context)
}
}
func
(
me
*
LoopbackFileSystem
)
Create
(
path
string
,
flags
uint32
,
mode
uint32
,
context
*
Context
)
(
fuseFile
File
,
code
Status
)
{
func
(
me
*
LoopbackFileSystem
)
Create
(
path
string
,
flags
uint32
,
mode
uint32
,
context
*
Context
)
(
fuseFile
File
,
code
Status
)
{
f
,
err
:=
os
.
OpenFile
(
me
.
GetPath
(
path
),
int
(
flags
)
|
os
.
O_CREATE
,
mode
)
f
,
err
:=
os
.
OpenFile
(
me
.
GetPath
(
path
),
int
(
flags
)
|
os
.
O_CREATE
,
os
.
FileMode
(
mode
)
)
return
&
LoopbackFile
{
File
:
f
},
ToStatus
(
err
)
return
&
LoopbackFile
{
File
:
f
},
ToStatus
(
err
)
}
}
func
(
me
*
LoopbackFileSystem
)
GetXAttr
(
name
string
,
attr
string
,
context
*
Context
)
([]
byte
,
Status
)
{
func
(
me
*
LoopbackFileSystem
)
GetXAttr
(
name
string
,
attr
string
,
context
*
Context
)
([]
byte
,
Status
)
{
data
:=
make
([]
byte
,
1024
)
data
:=
make
([]
byte
,
1024
)
data
,
errNo
:=
GetXAttr
(
me
.
GetPath
(
name
),
attr
,
data
)
data
,
errNo
:=
GetXAttr
(
me
.
GetPath
(
name
),
attr
,
data
)
return
data
,
Status
(
errNo
)
return
data
,
Status
(
errNo
)
}
}
...
...
fuse/loopback_test.go
View file @
76c6deb5
...
@@ -141,7 +141,7 @@ func (me *testCase) TestReadThrough(t *testing.T) {
...
@@ -141,7 +141,7 @@ func (me *testCase) TestReadThrough(t *testing.T) {
err
:=
ioutil
.
WriteFile
(
ts
.
origFile
,
[]
byte
(
contents
),
0700
)
err
:=
ioutil
.
WriteFile
(
ts
.
origFile
,
[]
byte
(
contents
),
0700
)
CheckSuccess
(
err
)
CheckSuccess
(
err
)
err
=
os
.
Chmod
(
ts
.
mountFile
,
mode
)
err
=
os
.
Chmod
(
ts
.
mountFile
,
os
.
FileMode
(
mode
)
)
CheckSuccess
(
err
)
CheckSuccess
(
err
)
fi
,
err
:=
os
.
Lstat
(
ts
.
mountFile
)
fi
,
err
:=
os
.
Lstat
(
ts
.
mountFile
)
...
...
unionfs/unionfs_test.go
View file @
76c6deb5
...
@@ -32,7 +32,7 @@ func freezeRo(dir string) {
...
@@ -32,7 +32,7 @@ func freezeRo(dir string) {
dir
,
dir
,
func
(
path
string
,
fi
os
.
FileInfo
,
err
error
)
error
{
func
(
path
string
,
fi
os
.
FileInfo
,
err
error
)
error
{
newMode
:=
uint32
(
fi
.
Mode
()
.
Perm
())
&^
0222
newMode
:=
uint32
(
fi
.
Mode
()
.
Perm
())
&^
0222
return
os
.
Chmod
(
path
,
newMode
)
return
os
.
Chmod
(
path
,
os
.
FileMode
(
newMode
)
)
})
})
CheckSuccess
(
err
)
CheckSuccess
(
err
)
}
}
...
...
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