Removed special handling of statfs.
parent
4d5341f6ce
commit
5921525aab
|
@ -405,14 +405,6 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
|
||||||
ctx = c.beginOp(inMsg.Header().Opcode, inMsg.Header().Unique)
|
ctx = c.beginOp(inMsg.Header().Opcode, inMsg.Header().Unique)
|
||||||
ctx = context.WithValue(ctx, contextKey, opState{inMsg, outMsg, op})
|
ctx = context.WithValue(ctx, contextKey, opState{inMsg, outMsg, op})
|
||||||
|
|
||||||
// Special case: responding to statfs is required to make mounting work on
|
|
||||||
// OS X. We don't currently expose the capability for the file system to
|
|
||||||
// intercept this.
|
|
||||||
if _, ok := op.(*statFSOp); ok {
|
|
||||||
c.Reply(ctx, nil)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the op to the user.
|
// Return the op to the user.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,7 +371,7 @@ func convertInMessage(
|
||||||
}
|
}
|
||||||
|
|
||||||
case fusekernel.OpStatfs:
|
case fusekernel.OpStatfs:
|
||||||
o = &statFSOp{}
|
o = &fuseops.StatFSOp{}
|
||||||
|
|
||||||
case fusekernel.OpInterrupt:
|
case fusekernel.OpInterrupt:
|
||||||
type input fusekernel.InterruptIn
|
type input fusekernel.InterruptIn
|
||||||
|
@ -557,8 +557,14 @@ func (c *Connection) kernelResponseForOp(
|
||||||
case *fuseops.ReadSymlinkOp:
|
case *fuseops.ReadSymlinkOp:
|
||||||
m.AppendString(o.Target)
|
m.AppendString(o.Target)
|
||||||
|
|
||||||
case *statFSOp:
|
case *fuseops.StatFSOp:
|
||||||
m.Grow(unsafe.Sizeof(fusekernel.StatfsOut{}))
|
out := (*fusekernel.StatfsOut)(m.Grow(unsafe.Sizeof(fusekernel.StatfsOut{})))
|
||||||
|
out.St.Blocks = o.Blocks
|
||||||
|
out.St.Bfree = o.BlocksFree
|
||||||
|
out.St.Bavail = o.BlocksAvailable
|
||||||
|
out.St.Files = o.Inodes
|
||||||
|
out.St.Ffree = o.InodesFree
|
||||||
|
out.St.Bsize = o.BlockSize
|
||||||
|
|
||||||
case *initOp:
|
case *initOp:
|
||||||
out := (*fusekernel.InitOut)(m.Grow(unsafe.Sizeof(fusekernel.InitOut{})))
|
out := (*fusekernel.InitOut)(m.Grow(unsafe.Sizeof(fusekernel.InitOut{})))
|
||||||
|
|
4
ops.go
4
ops.go
|
@ -26,10 +26,6 @@ type unknownOp struct {
|
||||||
Inode fuseops.InodeID
|
Inode fuseops.InodeID
|
||||||
}
|
}
|
||||||
|
|
||||||
// Required in order to mount on OS X.
|
|
||||||
type statFSOp struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Causes us to cancel the associated context.
|
// Causes us to cancel the associated context.
|
||||||
type interruptOp struct {
|
type interruptOp struct {
|
||||||
FuseID uint64
|
FuseID uint64
|
||||||
|
|
Loading…
Reference in New Issue