Commit 1d2327a4 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Debug print for access.

parent 51e8ea2f
...@@ -13,6 +13,7 @@ var fuseOpenFlagNames map[int]string ...@@ -13,6 +13,7 @@ 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 var releaseFlagNames map[int]string
var accessFlagName map[int]string
func init() { func init() {
releaseFlagNames = map[int]string{ releaseFlagNames = map[int]string{
...@@ -60,6 +61,11 @@ func init() { ...@@ -60,6 +61,11 @@ func init() {
readFlagNames = map[int]string{ readFlagNames = map[int]string{
READ_LOCKOWNER: "LOCKOWNER", READ_LOCKOWNER: "LOCKOWNER",
} }
accessFlagName = map[int]string{
X_OK: "x",
W_OK: "w",
R_OK: "r",
}
} }
func flagString(names map[int]string, fl int, def string) string { func flagString(names map[int]string, fl int, def string) string {
...@@ -189,3 +195,7 @@ func (me *ReleaseIn) String() string { ...@@ -189,3 +195,7 @@ func (me *ReleaseIn) String() string {
func (me *FlushIn) String() string { func (me *FlushIn) String() string {
return fmt.Sprintf("{Fh %d}", me.Fh) return fmt.Sprintf("{Fh %d}", me.Fh)
} }
func (me *AccessIn) String() string {
return fmt.Sprintf("{%s}", flagString(accessFlagName, int(me.Mask), ""))
}
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