From 1ea7c0c8c9e6b7fa56738857efcaad809e3bfc6a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 18 Mar 2012 17:38:51 -0700 Subject: [PATCH] fuse: use os.FileMode everywhere instead of uint32 Change-Id: I227990c86172c7b28ad2823badaaa3a1ce852f9a --- third_party/code.google.com/p/rsc/fuse/fuse.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/third_party/code.google.com/p/rsc/fuse/fuse.go b/third_party/code.google.com/p/rsc/fuse/fuse.go index d279e8b33..25892a21c 100644 --- a/third_party/code.google.com/p/rsc/fuse/fuse.go +++ b/third_party/code.google.com/p/rsc/fuse/fuse.go @@ -439,7 +439,7 @@ func (c *Conn) ReadRequest() (Request, error) { req = &MkdirRequest{ Header: m.Header(), Name: string(name[:i]), - Mode: os.ModeDir | os.FileMode(in.Mode&0777), // XXX + Mode: fileMode(in.Mode) | os.ModeDir, } case opUnlink, opRmdir: @@ -491,7 +491,7 @@ func (c *Conn) ReadRequest() (Request, error) { Header: m.Header(), Dir: m.hdr.Opcode == opOpendir, Flags: in.Flags, - Mode: in.Mode, + Mode: fileMode(in.Mode), } case opRead, opReaddir: @@ -696,7 +696,7 @@ func (c *Conn) ReadRequest() (Request, error) { req = &CreateRequest{ Header: m.Header(), Flags: in.Flags, - Mode: in.Mode, // XXX + Mode: fileMode(in.Mode), Name: string(name[:i]), } @@ -1088,11 +1088,11 @@ type OpenRequest struct { Header Dir bool // is this Opendir? Flags uint32 - Mode uint32 + Mode os.FileMode } func (r *OpenRequest) String() string { - return fmt.Sprintf("Open [%s] dir=%v fl=%v mode=%#x", &r.Header, r.Dir, r.Flags, r.Mode) + return fmt.Sprintf("Open [%s] dir=%v fl=%v mode=%v", &r.Header, r.Dir, r.Flags, r.Mode) } // Respond replies to the request with the given response. @@ -1120,11 +1120,11 @@ type CreateRequest struct { Header Name string Flags uint32 - Mode uint32 + Mode os.FileMode } func (r *CreateRequest) String() string { - return fmt.Sprintf("Create [%s] %q fl=%v mode=%#x", &r.Header, r.Name, r.Flags, r.Mode) + return fmt.Sprintf("Create [%s] %q fl=%v mode=%v", &r.Header, r.Name, r.Flags, r.Mode) } // Respond replies to the request with the given response.