Fixed a logging bug.

geesefs-0-30-9
Aaron Jacobs 2015-07-24 11:13:17 +10:00
parent 22c5b466f6
commit 9b8d9280ac
2 changed files with 4 additions and 2 deletions

View File

@ -261,7 +261,7 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
}
// Log the receipt of the operation.
c.debugLog(opID, 1, "<- %v", op)
c.debugLog(opID, 1, "<- %v", op.ShortDesc())
// Special case: responding to statfs is required to make mounting work on
// OS X. We don't currently expose the capability for the file system to

View File

@ -80,9 +80,11 @@ func (o *commonOp) ShortDesc() (desc string) {
opName = opName[len(prefix) : len(opName)-len(suffix)]
}
desc = opName
// Include the inode number to which the op applies, if possible.
if f := v.Elem().FieldByName("Inode"); f.IsValid() {
desc = fmt.Sprintf("%s(inode=%v)", opName, f.Interface())
desc = fmt.Sprintf("%s(inode=%v)", desc, f.Interface())
}
return