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
05a51a96
Commit
05a51a96
authored
Sep 26, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug print for filenames in notify/readlink.
parent
1ca9a271
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
fuse/opcode.go
fuse/opcode.go
+6
-0
fuse/request.go
fuse/request.go
+8
-2
No files found.
fuse/opcode.go
View file @
05a51a96
...
...
@@ -309,6 +309,7 @@ type operationHandler struct {
DecodeIn
castPointerFunc
DecodeOut
castPointerFunc
FileNames
int
FileNameOut
bool
}
var
operationHandlers
[]
*
operationHandler
...
...
@@ -338,6 +339,11 @@ func init() {
operationHandlers
[
i
]
=
&
operationHandler
{
Name
:
"UNKNOWN"
}
}
fileOps
:=
[]
opcode
{
_OP_READLINK
,
_OP_NOTIFY_ENTRY
}
for
_
,
op
:=
range
fileOps
{
operationHandlers
[
op
]
.
FileNameOut
=
true
}
for
op
,
sz
:=
range
map
[
opcode
]
uintptr
{
_OP_FORGET
:
unsafe
.
Sizeof
(
ForgetIn
{}),
_OP_GETATTR
:
unsafe
.
Sizeof
(
GetAttrIn
{}),
...
...
fuse/request.go
View file @
05a51a96
package
fuse
import
(
"fmt"
"bytes"
"fmt"
"log"
"strings"
"unsafe"
)
...
...
@@ -70,7 +71,12 @@ func (me *request) OutputDebug() string {
flatStr
:=
""
if
len
(
me
.
flatData
)
>
0
{
flatStr
=
fmt
.
Sprintf
(
" %d bytes data
\n
"
,
len
(
me
.
flatData
))
if
me
.
handler
.
FileNameOut
{
s
:=
strings
.
TrimRight
(
string
(
me
.
flatData
),
"
\x00
"
)
flatStr
=
fmt
.
Sprintf
(
" %q"
,
s
)
}
else
{
flatStr
=
fmt
.
Sprintf
(
" %d bytes data
\n
"
,
len
(
me
.
flatData
))
}
}
return
fmt
.
Sprintf
(
"Serialize: %v code: %v value: %v%v"
,
...
...
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