From 125c36dba8f1357905f1f8d84982837da37d983f Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Mon, 27 Jul 2015 14:37:59 +1000 Subject: [PATCH] Fixed up unknownOp. --- ops.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ops.go b/ops.go index 4f0e3a9..578e59c 100644 --- a/ops.go +++ b/ops.go @@ -286,8 +286,18 @@ type unknownOp struct { inode fuseops.InodeID } +func (o *unknownOp) ShortDesc() string { + return fmt.Sprintf("(inode=%d)", o.opCode, o.inode) +} + +func (o *unknownOp) DebugString() string { + return o.ShortDesc() +} + func (o *unknownOp) kernelResponse() (b buffer.OutMessage) { - panic(fmt.Sprintf("Should never get here for unknown op: %s", o.ShortDesc())) + panic(fmt.Sprintf( + "Expected an error response for unknown op: %s", + o.ShortDesc())) } ////////////////////////////////////////////////////////////////////////