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 { ...@@ -206,14 +206,6 @@ func (me *StatfsOut) String() string {
me.Bsize, me.NameLen, me.Frsize) 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 { func (me *WriteIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}", return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size, me.Fh, me.Offset, me.Size,
......
...@@ -19,4 +19,11 @@ func (a *Attr) String() string { ...@@ -19,4 +19,11 @@ func (a *Attr) String() string {
a.Ctime, a.Ctimensec) a.Ctime, a.Ctimensec)
} }
func (me *GetAttrIn) String() string { return "" } func (me *GetAttrIn) String() string { return "" }
\ No newline at end of file
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 { ...@@ -29,3 +29,11 @@ func (a *Attr) String() string {
func (me *GetAttrIn) String() string { func (me *GetAttrIn) String() string {
return fmt.Sprintf("{Fh %d}", me.Fh_) 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 { ...@@ -367,20 +367,11 @@ type Dirent struct {
Typ uint32 Typ uint32
} }
const ( const (
READ_LOCKOWNER = (1 << 1) READ_LOCKOWNER = (1 << 1)
) )
type ReadIn struct {
Fh uint64
Offset uint64
Size uint32
ReadFlags uint32
LockOwner uint64
Flags uint32
Padding uint32
}
const ( const (
WRITE_CACHE = (1 << 0) WRITE_CACHE = (1 << 0)
WRITE_LOCKOWNER = (1 << 1) WRITE_LOCKOWNER = (1 << 1)
......
...@@ -48,4 +48,11 @@ func (g *GetAttrIn) Flags() uint32 { ...@@ -48,4 +48,11 @@ func (g *GetAttrIn) Flags() uint32 {
func (g *GetAttrIn) Fh() uint64 { func (g *GetAttrIn) Fh() uint64 {
return 0 return 0
} }
\ No newline at end of file
type ReadIn struct {
Fh uint64
Offset uint64
Size uint32
ReadFlags uint32
}
...@@ -40,3 +40,14 @@ func (g *GetAttrIn) Flags() uint32 { ...@@ -40,3 +40,14 @@ func (g *GetAttrIn) Flags() uint32 {
func (g *GetAttrIn) Fh() uint64 { func (g *GetAttrIn) Fh() uint64 {
return g.Fh_ 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