Commit c98fbba1 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Fix ReadIn type for darwin.

parent e75e9054
......@@ -206,14 +206,6 @@ func (me *StatfsOut) String() string {
me.Bsize, me.NameLen, me.Frsize)
}
func (me *ReadIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
FlagString(readFlagNames, int(me.ReadFlags), ""),
me.LockOwner,
FlagString(OpenFlagNames, int(me.Flags), "RDONLY"))
}
func (me *WriteIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
......
......@@ -20,3 +20,10 @@ func (a *Attr) String() string {
}
func (me *GetAttrIn) String() string { return "" }
func (me *ReadIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
FlagString(readFlagNames, int(me.ReadFlags), ""))
}
......@@ -29,3 +29,11 @@ func (a *Attr) String() string {
func (me *GetAttrIn) String() string {
return fmt.Sprintf("{Fh %d}", me.Fh_)
}
func (me *ReadIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
FlagString(readFlagNames, int(me.ReadFlags), ""),
me.LockOwner,
FlagString(OpenFlagNames, int(me.Flags), "RDONLY"))
}
......@@ -367,20 +367,11 @@ type Dirent struct {
Typ uint32
}
const (
READ_LOCKOWNER = (1 << 1)
)
type ReadIn struct {
Fh uint64
Offset uint64
Size uint32
ReadFlags uint32
LockOwner uint64
Flags uint32
Padding uint32
}
const (
WRITE_CACHE = (1 << 0)
WRITE_LOCKOWNER = (1 << 1)
......
......@@ -49,3 +49,10 @@ func (g *GetAttrIn) Flags() uint32 {
func (g *GetAttrIn) Fh() uint64 {
return 0
}
type ReadIn struct {
Fh uint64
Offset uint64
Size uint32
ReadFlags uint32
}
......@@ -40,3 +40,14 @@ func (g *GetAttrIn) Flags() uint32 {
func (g *GetAttrIn) Fh() uint64 {
return g.Fh_
}
type ReadIn struct {
Fh uint64
Offset uint64
Size uint32
ReadFlags uint32
LockOwner uint64
Flags uint32
Padding uint32
}
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