From 2752bfa80c7fec1e19395dd1bd86f8712485e97e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 10 Feb 2013 19:20:58 -0800 Subject: [PATCH] fuse: minimal handling of opInterrupt Change-Id: Idd00f531fdc63d894a41103f2c25e418c397bad5 --- third_party/code.google.com/p/rsc/fuse/fuse.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/third_party/code.google.com/p/rsc/fuse/fuse.go b/third_party/code.google.com/p/rsc/fuse/fuse.go index 2ad10c93e..e02f4fc3b 100644 --- a/third_party/code.google.com/p/rsc/fuse/fuse.go +++ b/third_party/code.google.com/p/rsc/fuse/fuse.go @@ -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.