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
681d28a2
Commit
681d28a2
authored
Mar 29, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move CreateIn.
parent
71266c84
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
20 deletions
+20
-20
fuse/api.go
fuse/api.go
+1
-1
fuse/defaultraw.go
fuse/defaultraw.go
+1
-1
fuse/fsops.go
fuse/fsops.go
+1
-1
fuse/lockingfs.go
fuse/lockingfs.go
+1
-1
fuse/opcode.go
fuse/opcode.go
+3
-3
fuse/typeprint.go
fuse/typeprint.go
+0
-6
fuse/types.go
fuse/types.go
+0
-7
raw/print.go
raw/print.go
+6
-0
raw/types.go
raw/types.go
+7
-0
No files found.
fuse/api.go
View file @
681d28a2
...
...
@@ -276,7 +276,7 @@ type RawFileSystem interface {
RemoveXAttr
(
header
*
InHeader
,
attr
string
)
(
code
Status
)
// File handling.
Create
(
header
*
InHeader
,
input
*
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
Create
(
header
*
InHeader
,
input
*
raw
.
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
Open
(
header
*
InHeader
,
input
*
raw
.
OpenIn
)
(
flags
uint32
,
handle
uint64
,
status
Status
)
Read
(
*
InHeader
,
*
ReadIn
,
BufferPool
)
([]
byte
,
Status
)
...
...
fuse/defaultraw.go
View file @
681d28a2
...
...
@@ -86,7 +86,7 @@ func (me *DefaultRawFileSystem) Access(header *InHeader, input *raw.AccessIn) (c
return
ENOSYS
}
func
(
me
*
DefaultRawFileSystem
)
Create
(
header
*
InHeader
,
input
*
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
{
func
(
me
*
DefaultRawFileSystem
)
Create
(
header
*
InHeader
,
input
*
raw
.
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
{
return
0
,
0
,
nil
,
ENOSYS
}
...
...
fuse/fsops.go
View file @
681d28a2
...
...
@@ -267,7 +267,7 @@ func (me *FileSystemConnector) Access(header *InHeader, input *raw.AccessIn) (co
return
n
.
fsInode
.
Access
(
input
.
Mask
,
&
header
.
Context
)
}
func
(
me
*
FileSystemConnector
)
Create
(
header
*
InHeader
,
input
*
CreateIn
,
name
string
)
(
flags
uint32
,
h
uint64
,
out
*
EntryOut
,
code
Status
)
{
func
(
me
*
FileSystemConnector
)
Create
(
header
*
InHeader
,
input
*
raw
.
CreateIn
,
name
string
)
(
flags
uint32
,
h
uint64
,
out
*
EntryOut
,
code
Status
)
{
parent
:=
me
.
toInode
(
header
.
NodeId
)
f
,
fi
,
fsNode
,
code
:=
parent
.
fsInode
.
Create
(
name
,
uint32
(
input
.
Flags
),
input
.
Mode
,
&
header
.
Context
)
if
!
code
.
Ok
()
{
...
...
fuse/lockingfs.go
View file @
681d28a2
...
...
@@ -255,7 +255,7 @@ func (me *LockingRawFileSystem) Access(header *InHeader, input *raw.AccessIn) (c
return
me
.
RawFileSystem
.
Access
(
header
,
input
)
}
func
(
me
*
LockingRawFileSystem
)
Create
(
header
*
InHeader
,
input
*
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
{
func
(
me
*
LockingRawFileSystem
)
Create
(
header
*
InHeader
,
input
*
raw
.
CreateIn
,
name
string
)
(
flags
uint32
,
handle
uint64
,
out
*
EntryOut
,
code
Status
)
{
defer
me
.
locked
()()
return
me
.
RawFileSystem
.
Create
(
header
,
input
,
name
)
}
...
...
fuse/opcode.go
View file @
681d28a2
...
...
@@ -120,7 +120,7 @@ func doOpen(state *MountState, req *request) {
}
func
doCreate
(
state
*
MountState
,
req
*
request
)
{
flags
,
handle
,
entry
,
status
:=
state
.
fileSystem
.
Create
(
req
.
inHeader
,
(
*
CreateIn
)(
req
.
inData
),
req
.
filenames
[
0
])
flags
,
handle
,
entry
,
status
:=
state
.
fileSystem
.
Create
(
req
.
inHeader
,
(
*
raw
.
CreateIn
)(
req
.
inData
),
req
.
filenames
[
0
])
req
.
status
=
status
if
status
.
Ok
()
{
req
.
outData
=
unsafe
.
Pointer
(
&
CreateOut
{
...
...
@@ -411,7 +411,7 @@ func init() {
_OP_RELEASEDIR
:
unsafe
.
Sizeof
(
raw
.
ReleaseIn
{}),
_OP_FSYNCDIR
:
unsafe
.
Sizeof
(
raw
.
FsyncIn
{}),
_OP_ACCESS
:
unsafe
.
Sizeof
(
raw
.
AccessIn
{}),
_OP_CREATE
:
unsafe
.
Sizeof
(
CreateIn
{}),
_OP_CREATE
:
unsafe
.
Sizeof
(
raw
.
CreateIn
{}),
_OP_INTERRUPT
:
unsafe
.
Sizeof
(
raw
.
InterruptIn
{}),
_OP_BMAP
:
unsafe
.
Sizeof
(
raw
.
BmapIn
{}),
_OP_IOCTL
:
unsafe
.
Sizeof
(
raw
.
IoctlIn
{}),
...
...
@@ -555,7 +555,7 @@ func init() {
_OP_IOCTL
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
IoctlIn
)(
ptr
)
},
_OP_OPEN
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
OpenIn
)(
ptr
)
},
_OP_MKNOD
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
MknodIn
)(
ptr
)
},
_OP_CREATE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
CreateIn
)(
ptr
)
},
_OP_CREATE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
CreateIn
)(
ptr
)
},
_OP_READ
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
ReadIn
)(
ptr
)
},
_OP_READDIR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
ReadIn
)(
ptr
)
},
_OP_ACCESS
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
AccessIn
)(
ptr
)
},
...
...
fuse/typeprint.go
View file @
681d28a2
...
...
@@ -39,12 +39,6 @@ func (me *AttrOut) String() string {
me
.
AttrValid
,
me
.
AttrValidNsec
,
&
me
.
Attr
)
}
func
(
me
*
CreateIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{0%o [%s] (0%o)}"
,
me
.
Mode
,
raw
.
FlagString
(
raw
.
OpenFlagNames
,
int
(
me
.
Flags
),
"O_RDONLY"
),
me
.
Umask
)
}
func
(
me
*
EntryOut
)
String
()
string
{
return
fmt
.
Sprintf
(
"{%d E%d.%09d A%d.%09d %v}"
,
me
.
NodeId
,
me
.
EntryValid
,
me
.
EntryValidNsec
,
...
...
fuse/types.go
View file @
681d28a2
...
...
@@ -124,13 +124,6 @@ type AttrOut struct {
Attr
}
type
CreateIn
struct
{
Flags
uint32
Mode
uint32
Umask
uint32
Padding
uint32
}
type
CreateOut
struct
{
EntryOut
raw
.
OpenOut
...
...
raw/print.go
View file @
681d28a2
...
...
@@ -170,3 +170,9 @@ func (me *AccessIn) String() string {
return
fmt
.
Sprintf
(
"{%s}"
,
FlagString
(
accessFlagName
,
int
(
me
.
Mask
),
""
))
}
func
(
me
*
CreateIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{0%o [%s] (0%o)}"
,
me
.
Mode
,
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
"O_RDONLY"
),
me
.
Umask
)
}
raw/types.go
View file @
681d28a2
...
...
@@ -276,3 +276,10 @@ type OutHeader struct {
Status
int32
Unique
uint64
}
type
CreateIn
struct
{
Flags
uint32
Mode
uint32
Umask
uint32
Padding
uint32
}
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