Commit e6a4db99 authored by Aaron Jacobs's avatar Aaron Jacobs

errorFS.ReadFile

parent e5d377b5
......@@ -154,3 +154,21 @@ func (fs *errorFS) OpenFile(
return
}
// LOCKS_EXCLUDED(fs.mu)
func (fs *errorFS) ReadFile(
ctx context.Context,
op *fuseops.ReadFileOp) (err error) {
if fs.transformError(op, &err) {
return
}
if op.Inode != fooInodeID || op.Offset != 0 {
err = fmt.Errorf("Unexpected request: %#v", op)
return
}
op.BytesRead = copy(op.Dst, FooContents)
return
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment