Commit 4d73e177 authored by Valient Gough's avatar Valient Gough

Provides more OSX-specific kernel messages.

CreateIn, MknodIn, SetXAttrIn, and GetXAttrIn are separated into Linux and
Darwin-specific versions.

Tested on OSX 10.9.3 with OSXFuse 2.6.4 and Go 1.2.1.

OpenIn is updated to match Linux and OSXFuse definitions - changing the Unused
field to Mode.
parent 34673e47
......@@ -101,10 +101,6 @@ func (me *MkdirIn) string() string {
return fmt.Sprintf("{0%o (0%o)}", me.Mode, me.Umask)
}
func (me *MknodIn) string() string {
return fmt.Sprintf("{0%o (0%o), %d}", me.Mode, me.Umask, me.Rdev)
}
func (me *RenameIn) string() string {
return fmt.Sprintf("{%d}", me.Newdir)
}
......@@ -180,12 +176,6 @@ func (me *AccessIn) string() string {
return fmt.Sprintf("{%s}", FlagString(accessFlagName, int64(me.Mask), ""))
}
func (me *CreateIn) string() string {
return fmt.Sprintf(
"{0%o [%s] (0%o)}", me.Mode,
FlagString(OpenFlagNames, int64(me.Flags), "O_RDONLY"), me.Umask)
}
func (me *FlushIn) string() string {
return fmt.Sprintf("{Fh %d}", me.Fh)
}
......
......@@ -25,8 +25,18 @@ func (a *Attr) string() string {
a.Ctime, a.Ctimensec)
}
func (me *CreateIn) string() string {
return fmt.Sprintf(
"{0%o [%s]}", me.Mode,
FlagString(OpenFlagNames, int64(me.Flags), "O_RDONLY"))
}
func (me *GetAttrIn) string() string { return "" }
func (me *MknodIn) string() string {
return fmt.Sprintf("{0%o, %d}", me.Mode, me.Rdev)
}
func (me *ReadIn) string() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
......
......@@ -27,10 +27,20 @@ func (a *Attr) string() string {
a.Ctime, a.Ctimensec)
}
func (me *CreateIn) string() string {
return fmt.Sprintf(
"{0%o [%s] (0%o)}", me.Mode,
FlagString(OpenFlagNames, int64(me.Flags), "O_RDONLY"), me.Umask)
}
func (me *GetAttrIn) string() string {
return fmt.Sprintf("{Fh %d}", me.Fh_)
}
func (me *MknodIn) string() string {
return fmt.Sprintf("{0%o (0%o), %d}", me.Mode, me.Umask, me.Rdev)
}
func (me *ReadIn) string() string {
return fmt.Sprintf("{Fh %d off %d sz %d %s L %d %s}",
me.Fh, me.Offset, me.Size,
......
......@@ -66,14 +66,6 @@ type LinkIn struct {
Oldnodeid uint64
}
type MknodIn struct {
InHeader
Mode uint32
Rdev uint32
Umask uint32
Padding uint32
}
type Owner struct {
Uid uint32
Gid uint32
......@@ -124,8 +116,8 @@ type ReleaseIn struct {
type OpenIn struct {
InHeader
Flags uint32
Unused uint32
Flags uint32
Mode uint32
}
const (
......@@ -260,18 +252,6 @@ type WriteOut struct {
Padding uint32
}
type SetXAttrIn struct {
InHeader
Size uint32
Flags uint32
}
type GetXAttrIn struct {
InHeader
Size uint32
Padding uint32
}
type GetXAttrOut struct {
Size uint32
Padding uint32
......@@ -324,14 +304,6 @@ type OutHeader struct {
Unique uint64
}
type CreateIn struct {
InHeader
Flags uint32
Mode uint32
Umask uint32
Padding uint32
}
type NotifyInvalInodeOut struct {
Ino uint64
Off int64
......
......@@ -62,6 +62,21 @@ func (g *GetAttrIn) Fh() uint64 {
return 0
}
// Uses OpenIn struct for create.
type CreateIn struct {
InHeader
Flags uint32
Mode uint32
}
type MknodIn struct {
InHeader
Mode uint32
Rdev uint32
}
type ReadIn struct {
InHeader
......@@ -79,6 +94,22 @@ type WriteIn struct {
WriteFlags uint32
}
type SetXAttrIn struct {
InHeader
Size uint32
Flags uint32
Position uint32
Padding uint32
}
type GetXAttrIn struct {
InHeader
Size uint32
Padding uint32
Position uint32
Padding2 uint32
}
const (
CAP_CASE_INSENSITIVE = (1 << 29)
CAP_VOL_RENAME = (1 << 30)
......
......@@ -47,6 +47,22 @@ func (g *GetAttrIn) Fh() uint64 {
return g.Fh_
}
type CreateIn struct {
InHeader
Flags uint32
Mode uint32
Umask uint32
Pading uint32
}
type MknodIn struct {
InHeader
Mode uint32
Rdev uint32
Umask uint32
Padding uint32
}
type ReadIn struct {
InHeader
Fh uint64
......@@ -68,3 +84,15 @@ type WriteIn struct {
Flags uint32
Padding uint32
}
type SetXAttrIn struct {
InHeader
Size uint32
Flags uint32
}
type GetXAttrIn struct {
InHeader
Size 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