Commit 24dceee8 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Release print debug.

parent ab0b2f5f
...@@ -12,8 +12,12 @@ var initFlagNames map[int]string ...@@ -12,8 +12,12 @@ var initFlagNames map[int]string
var fuseOpenFlagNames map[int]string var fuseOpenFlagNames map[int]string
var writeFlagNames map[int]string var writeFlagNames map[int]string
var readFlagNames map[int]string var readFlagNames map[int]string
var releaseFlagNames map[int]string
func init() { func init() {
releaseFlagNames = map[int]string{
RELEASE_FLUSH: "FLUSH",
}
openFlagNames = map[int]string{ openFlagNames = map[int]string{
os.O_WRONLY: "WRONLY", os.O_WRONLY: "WRONLY",
os.O_RDWR: "RDWR", os.O_RDWR: "RDWR",
...@@ -128,6 +132,10 @@ func (me *CreateIn) String() string { ...@@ -128,6 +132,10 @@ func (me *CreateIn) String() string {
flagString(openFlagNames, int(me.Flags), "O_RDONLY"), me.Umask) flagString(openFlagNames, int(me.Flags), "O_RDONLY"), me.Umask)
} }
func (me *CreateOut) String() string {
return fmt.Sprintf("{%v %v}", &me.EntryOut, &me.OpenOut)
}
func (me *OpenOut) String() string { func (me *OpenOut) String() string {
return fmt.Sprintf("{Fh %d %s}", me.Fh, return fmt.Sprintf("{Fh %d %s}", me.Fh,
flagString(fuseOpenFlagNames, int(me.OpenFlags), "")) flagString(fuseOpenFlagNames, int(me.OpenFlags), ""))
...@@ -162,7 +170,8 @@ func (me *MkdirIn) String() string { ...@@ -162,7 +170,8 @@ func (me *MkdirIn) String() string {
} }
func (me *ReleaseIn) String() string { func (me *ReleaseIn) String() string {
return fmt.Sprintf("{Fh %d %s 0x%x %d}", return fmt.Sprintf("{Fh %d %s %s %d}",
me.Fh, flagString(openFlagNames, int(me.Flags), ""), me.ReleaseFlags, me.Fh, flagString(openFlagNames, int(me.Flags), ""),
flagString(releaseFlagNames, int(me.ReleaseFlags), ""),
me.LockOwner) me.LockOwner)
} }
...@@ -12,8 +12,6 @@ const ( ...@@ -12,8 +12,6 @@ const (
CUSE_UNRESTRICTED_IOCTL = (1 << 0) CUSE_UNRESTRICTED_IOCTL = (1 << 0)
FUSE_RELEASE_FLUSH = (1 << 0)
FUSE_LK_FLOCK = (1 << 0) FUSE_LK_FLOCK = (1 << 0)
FUSE_IOCTL_MAX_IOV = 256 FUSE_IOCTL_MAX_IOV = 256
...@@ -226,6 +224,9 @@ type CreateOut struct { ...@@ -226,6 +224,9 @@ type CreateOut struct {
OpenOut OpenOut
} }
const RELEASE_FLUSH = (1 << 0)
type ReleaseIn struct { type ReleaseIn struct {
Fh uint64 Fh uint64
Flags uint32 Flags uint32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment