Improve error log output for unknown operations.

Previously:

    (unknown(inode=1)) error: function not implemented

Now:

    (*bazilfuse.GetxattrRequest(inode=1)) error: function not implemented

For GoogleCloudPlatform/gcsfuse#76.
geesefs-0-30-9
Aaron Jacobs 2015-06-22 12:40:40 +10:00
parent 23590532ff
commit 91a3b44294
1 changed files with 5 additions and 0 deletions

View File

@ -825,6 +825,11 @@ type unknownOp struct {
commonOp
}
func (o *unknownOp) ShortDesc() (desc string) {
desc = fmt.Sprintf("%T(inode=%v)", o.bazilReq, o.bazilReq.Hdr().Node)
return
}
func (o *unknownOp) toBazilfuseResponse() (bfResp interface{}) {
panic(fmt.Sprintf("Should never get here for unknown op: %s", o.ShortDesc()))
}