Implemented missing functions.

geesefs-0-30-9
Aaron Jacobs 2015-03-24 14:38:18 +11:00
parent 73732d4425
commit e4d3d0aa56
1 changed files with 18 additions and 3 deletions

View File

@ -49,12 +49,27 @@ type commonOp struct {
r bazilfuse.Request
}
func (o *commonOp) init(r bazilfuse.Request)
func (o *commonOp) init(r bazilfuse.Request) {
o.ctx = context.Background()
o.r = r
}
func (o *commonOp) Header() OpHeader
func (o *commonOp) Header() OpHeader {
bh := o.r.Hdr()
return OpHeader{
Uid: bh.Uid,
Gid: bh.Gid,
}
}
func (o *commonOp) Context() context.Context {
return o.ctx
}
func (o *commonOp) Respond(err error)
func (o *commonOp) Respond(err error) {
if err != nil {
panic("Expect non-nil here.")
}
o.r.RespondError(err)
}