fuse: minimal handling of opInterrupt

Change-Id: Idd00f531fdc63d894a41103f2c25e418c397bad5
This commit is contained in:
Brad Fitzpatrick 2013-02-10 19:20:58 -08:00
parent f8912713ca
commit 2752bfa80c
1 changed files with 14 additions and 1 deletions

View File

@ -708,7 +708,15 @@ func (c *Conn) ReadRequest() (Request, error) {
}
case opInterrupt:
panic("opInterrupt")
in := (*interruptIn)(m.data())
if m.len() < unsafe.Sizeof(*in) {
goto corrupt
}
req = &InterruptRequest{
Header: m.Header(),
Unique: in.Unique,
}
case opBmap:
panic("opBmap")
@ -1612,6 +1620,11 @@ func (r *FsyncRequest) Respond() {
r.Conn.respond(out, unsafe.Sizeof(*out))
}
type InterruptRequest struct {
Header
Unique uint64
}
/*{
// A XXXRequest xxx.