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

Fix WriteIn type for Darwin.

parent c98fbba1
...@@ -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 *WriteIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
FlagString(writeFlagNames, int(me.WriteFlags), ""),
me.LockOwner,
FlagString(OpenFlagNames, int(me.Flags), "RDONLY"))
}
func (o *NotifyInvalEntryOut) String() string { func (o *NotifyInvalEntryOut) String() string {
return fmt.Sprintf("{parent %d sz %d}", o.Parent, o.NameLen) return fmt.Sprintf("{parent %d sz %d}", o.Parent, o.NameLen)
} }
......
...@@ -27,3 +27,8 @@ func (me *ReadIn) String() string { ...@@ -27,3 +27,8 @@ func (me *ReadIn) String() string {
FlagString(readFlagNames, int(me.ReadFlags), "")) FlagString(readFlagNames, int(me.ReadFlags), ""))
} }
func (me *WriteIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s}",
me.Fh, me.Offset, me.Size,
FlagString(writeFlagNames, int(me.WriteFlags), ""))
}
...@@ -37,3 +37,11 @@ func (me *ReadIn) String() string { ...@@ -37,3 +37,11 @@ func (me *ReadIn) String() string {
me.LockOwner, me.LockOwner,
FlagString(OpenFlagNames, int(me.Flags), "RDONLY")) 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,
FlagString(writeFlagNames, int(me.WriteFlags), ""),
me.LockOwner,
FlagString(OpenFlagNames, int(me.Flags), "RDONLY"))
}
...@@ -92,6 +92,8 @@ const ( ...@@ -92,6 +92,8 @@ const (
FOPEN_DIRECT_IO = (1 << 0) FOPEN_DIRECT_IO = (1 << 0)
FOPEN_KEEP_CACHE = (1 << 1) FOPEN_KEEP_CACHE = (1 << 1)
FOPEN_NONSEEKABLE = (1 << 2) FOPEN_NONSEEKABLE = (1 << 2)
) )
type OpenOut struct { type OpenOut struct {
...@@ -367,7 +369,6 @@ type Dirent struct { ...@@ -367,7 +369,6 @@ type Dirent struct {
Typ uint32 Typ uint32
} }
const ( const (
READ_LOCKOWNER = (1 << 1) READ_LOCKOWNER = (1 << 1)
) )
...@@ -376,13 +377,3 @@ const ( ...@@ -376,13 +377,3 @@ const (
WRITE_CACHE = (1 << 0) WRITE_CACHE = (1 << 0)
WRITE_LOCKOWNER = (1 << 1) WRITE_LOCKOWNER = (1 << 1)
) )
type WriteIn struct {
Fh uint64
Offset uint64
Size uint32
WriteFlags uint32
LockOwner uint64
Flags uint32
Padding uint32
}
...@@ -56,3 +56,10 @@ type ReadIn struct { ...@@ -56,3 +56,10 @@ type ReadIn struct {
Size uint32 Size uint32
ReadFlags uint32 ReadFlags uint32
} }
type WriteIn struct {
Fh uint64
Offset uint64
Size uint32
WriteFlags uint32
}
...@@ -51,3 +51,14 @@ type ReadIn struct { ...@@ -51,3 +51,14 @@ type ReadIn struct {
Flags uint32 Flags uint32
Padding uint32 Padding uint32
} }
type WriteIn struct {
Fh uint64
Offset uint64
Size uint32
WriteFlags 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