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
Kirill Smelkov
go-fuse
Commits
e90b7f3a
Commit
e90b7f3a
authored
Feb 25, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use 64 bit values for flag debug printing.
parent
060980b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
45 deletions
+45
-45
fuse/typeprint.go
fuse/typeprint.go
+2
-2
raw/print.go
raw/print.go
+37
-37
raw/print_darwin.go
raw/print_darwin.go
+2
-2
raw/print_linux.go
raw/print_linux.go
+4
-4
No files found.
fuse/typeprint.go
View file @
e90b7f3a
...
...
@@ -7,8 +7,8 @@ import (
func
(
me
*
WithFlags
)
String
()
string
{
return
fmt
.
Sprintf
(
"File %s (%s) %s %s"
,
me
.
File
,
me
.
Description
,
raw
.
FlagString
(
raw
.
OpenFlagNames
,
int
(
me
.
OpenFlags
),
"O_RDONLY"
),
raw
.
FlagString
(
raw
.
FuseOpenFlagNames
,
int
(
me
.
FuseFlags
),
""
))
me
.
File
,
me
.
Description
,
raw
.
FlagString
(
raw
.
OpenFlagNames
,
int
64
(
me
.
OpenFlags
),
"O_RDONLY"
),
raw
.
FlagString
(
raw
.
FuseOpenFlagNames
,
int
64
(
me
.
FuseFlags
),
""
))
}
func
(
a
*
Attr
)
String
()
string
{
...
...
raw/print.go
View file @
e90b7f3a
...
...
@@ -7,23 +7,23 @@ import (
"syscall"
)
var
initFlagNames
map
[
int
]
string
var
releaseFlagNames
map
[
int
]
string
var
OpenFlagNames
map
[
int
]
string
var
FuseOpenFlagNames
map
[
int
]
string
var
accessFlagName
map
[
int
]
string
var
writeFlagNames
map
[
int
]
string
var
readFlagNames
map
[
int
]
string
var
initFlagNames
map
[
int
64
]
string
var
releaseFlagNames
map
[
int
64
]
string
var
OpenFlagNames
map
[
int
64
]
string
var
FuseOpenFlagNames
map
[
int
64
]
string
var
accessFlagName
map
[
int
64
]
string
var
writeFlagNames
map
[
int
64
]
string
var
readFlagNames
map
[
int
64
]
string
func
init
()
{
writeFlagNames
=
map
[
int
]
string
{
writeFlagNames
=
map
[
int
64
]
string
{
WRITE_CACHE
:
"CACHE"
,
WRITE_LOCKOWNER
:
"LOCKOWNER"
,
}
readFlagNames
=
map
[
int
]
string
{
readFlagNames
=
map
[
int
64
]
string
{
READ_LOCKOWNER
:
"LOCKOWNER"
,
}
initFlagNames
=
map
[
int
]
string
{
initFlagNames
=
map
[
int
64
]
string
{
CAP_ASYNC_READ
:
"ASYNC_READ"
,
CAP_POSIX_LOCKS
:
"POSIX_LOCKS"
,
CAP_FILE_OPS
:
"FILE_OPS"
,
...
...
@@ -41,30 +41,30 @@ func init() {
CAP_READDIRPLUS_AUTO
:
"READDIRPLUS_AUTO"
,
}
releaseFlagNames
=
map
[
int
]
string
{
releaseFlagNames
=
map
[
int
64
]
string
{
RELEASE_FLUSH
:
"FLUSH"
,
}
OpenFlagNames
=
map
[
int
]
string
{
os
.
O_WRONLY
:
"WRONLY"
,
os
.
O_RDWR
:
"RDWR"
,
os
.
O_APPEND
:
"APPEND"
,
syscall
.
O_ASYNC
:
"ASYNC"
,
os
.
O_CREATE
:
"CREAT"
,
os
.
O_EXCL
:
"EXCL"
,
syscall
.
O_NOCTTY
:
"NOCTTY"
,
syscall
.
O_NONBLOCK
:
"NONBLOCK"
,
os
.
O_SYNC
:
"SYNC"
,
os
.
O_TRUNC
:
"TRUNC"
,
syscall
.
O_CLOEXEC
:
"CLOEXEC"
,
syscall
.
O_DIRECTORY
:
"DIRECTORY"
,
}
FuseOpenFlagNames
=
map
[
int
]
string
{
OpenFlagNames
=
map
[
int
64
]
string
{
int64
(
os
.
O_WRONLY
)
:
"WRONLY"
,
int64
(
os
.
O_RDWR
)
:
"RDWR"
,
int64
(
os
.
O_APPEND
)
:
"APPEND"
,
int64
(
syscall
.
O_ASYNC
)
:
"ASYNC"
,
int64
(
os
.
O_CREATE
)
:
"CREAT"
,
int64
(
os
.
O_EXCL
)
:
"EXCL"
,
int64
(
syscall
.
O_NOCTTY
)
:
"NOCTTY"
,
int64
(
syscall
.
O_NONBLOCK
)
:
"NONBLOCK"
,
int64
(
os
.
O_SYNC
)
:
"SYNC"
,
int64
(
os
.
O_TRUNC
)
:
"TRUNC"
,
int64
(
syscall
.
O_CLOEXEC
)
:
"CLOEXEC"
,
int64
(
syscall
.
O_DIRECTORY
)
:
"DIRECTORY"
,
}
FuseOpenFlagNames
=
map
[
int
64
]
string
{
FOPEN_DIRECT_IO
:
"DIRECT"
,
FOPEN_KEEP_CACHE
:
"CACHE"
,
FOPEN_NONSEEKABLE
:
"NONSEEK"
,
}
accessFlagName
=
map
[
int
]
string
{
accessFlagName
=
map
[
int
64
]
string
{
X_OK
:
"x"
,
W_OK
:
"w"
,
R_OK
:
"r"
,
...
...
@@ -72,7 +72,7 @@ func init() {
}
func
FlagString
(
names
map
[
int
]
string
,
fl
int
,
def
string
)
string
{
func
FlagString
(
names
map
[
int
64
]
string
,
fl
int64
,
def
string
)
string
{
s
:=
[]
string
{}
for
k
,
v
:=
range
names
{
if
fl
&
k
!=
0
{
...
...
@@ -135,30 +135,30 @@ func (me *SetAttrIn) String() string {
func
(
me
*
ReleaseIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d %s %s L%d}"
,
me
.
Fh
,
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
""
),
FlagString
(
releaseFlagNames
,
int
(
me
.
ReleaseFlags
),
""
),
me
.
Fh
,
FlagString
(
OpenFlagNames
,
int
64
(
me
.
Flags
),
""
),
FlagString
(
releaseFlagNames
,
int
64
(
me
.
ReleaseFlags
),
""
),
me
.
LockOwner
)
}
func
(
me
*
OpenIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{%s}"
,
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
"O_RDONLY"
))
return
fmt
.
Sprintf
(
"{%s}"
,
FlagString
(
OpenFlagNames
,
int
64
(
me
.
Flags
),
"O_RDONLY"
))
}
func
(
me
*
OpenOut
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d %s}"
,
me
.
Fh
,
FlagString
(
FuseOpenFlagNames
,
int
(
me
.
OpenFlags
),
""
))
FlagString
(
FuseOpenFlagNames
,
int
64
(
me
.
OpenFlags
),
""
))
}
func
(
me
*
InitIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{%d.%d Ra 0x%x %s}"
,
me
.
Major
,
me
.
Minor
,
me
.
MaxReadAhead
,
FlagString
(
initFlagNames
,
int
(
me
.
Flags
),
""
))
FlagString
(
initFlagNames
,
int
64
(
me
.
Flags
),
""
))
}
func
(
me
*
InitOut
)
String
()
string
{
return
fmt
.
Sprintf
(
"{%d.%d Ra 0x%x %s %d/%d Wr 0x%x}"
,
me
.
Major
,
me
.
Minor
,
me
.
MaxReadAhead
,
FlagString
(
initFlagNames
,
int
(
me
.
Flags
),
""
),
FlagString
(
initFlagNames
,
int
64
(
me
.
Flags
),
""
),
me
.
CongestionThreshold
,
me
.
MaxBackground
,
me
.
MaxWrite
)
}
...
...
@@ -174,13 +174,13 @@ func (me *GetXAttrOut) String() string {
return
fmt
.
Sprintf
(
"{sz %d}"
,
me
.
Size
)
}
func
(
me
*
AccessIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{%s}"
,
FlagString
(
accessFlagName
,
int
(
me
.
Mask
),
""
))
return
fmt
.
Sprintf
(
"{%s}"
,
FlagString
(
accessFlagName
,
int
64
(
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
)
FlagString
(
OpenFlagNames
,
int
64
(
me
.
Flags
),
"O_RDONLY"
),
me
.
Umask
)
}
func
(
me
*
FlushIn
)
String
()
string
{
...
...
raw/print_darwin.go
View file @
e90b7f3a
...
...
@@ -30,11 +30,11 @@ func (me *GetAttrIn) String() string { return "" }
func
(
me
*
ReadIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d off %d sz %d %s L %d %s}"
,
me
.
Fh
,
me
.
Offset
,
me
.
Size
,
FlagString
(
readFlagNames
,
int
(
me
.
ReadFlags
),
""
))
FlagString
(
readFlagNames
,
int
64
(
me
.
ReadFlags
),
""
))
}
func
(
me
*
WriteIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d off %d sz %d %s}"
,
me
.
Fh
,
me
.
Offset
,
me
.
Size
,
FlagString
(
writeFlagNames
,
int
(
me
.
WriteFlags
),
""
))
FlagString
(
writeFlagNames
,
int
64
(
me
.
WriteFlags
),
""
))
}
raw/print_linux.go
View file @
e90b7f3a
...
...
@@ -33,15 +33,15 @@ func (me *GetAttrIn) String() string {
func
(
me
*
ReadIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d off %d sz %d %s L %d %s}"
,
me
.
Fh
,
me
.
Offset
,
me
.
Size
,
FlagString
(
readFlagNames
,
int
(
me
.
ReadFlags
),
""
),
FlagString
(
readFlagNames
,
int
64
(
me
.
ReadFlags
),
""
),
me
.
LockOwner
,
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
"RDONLY"
))
FlagString
(
OpenFlagNames
,
int
64
(
me
.
Flags
),
"RDONLY"
))
}
func
(
me
*
WriteIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d off %d sz %d %s L %d %s}"
,
me
.
Fh
,
me
.
Offset
,
me
.
Size
,
FlagString
(
writeFlagNames
,
int
(
me
.
WriteFlags
),
""
),
FlagString
(
writeFlagNames
,
int
64
(
me
.
WriteFlags
),
""
),
me
.
LockOwner
,
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
"RDONLY"
))
FlagString
(
OpenFlagNames
,
int
64
(
me
.
Flags
),
"RDONLY"
))
}
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