Skip to content

Commit

Permalink
debug: add file handle to OpenFile and ReleaseFileHandle (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-vish committed Jun 7, 2024
1 parent a2f23ee commit 7285af0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func describeRequest(op interface{}) (s string) {
addComponent("offset %d", typed.Offset)
addComponent("length %d", typed.Length)
addComponent("mode %d", typed.Mode)

case *fuseops.ReleaseFileHandleOp:
addComponent("handle %d", typed.Handle)
}

// Use just the name if there is no extra info.
Expand Down Expand Up @@ -142,5 +145,10 @@ func describeResponse(op interface{}) string {
}
}

switch typed := op.(type) {
case *fuseops.OpenFileOp:
addComponent("handle %d", typed.Handle)
}

return fmt.Sprintf("%s", strings.Join(components, ", "))
}

0 comments on commit 7285af0

Please sign in to comment.