vfs: decode flags in Open/OpenFile for debug

This commit is contained in:
Nick Craig-Wood
2017-11-14 21:00:08 +00:00
parent f5f8c0c438
commit e7f2935333
3 changed files with 39 additions and 2 deletions

View File

@@ -319,6 +319,7 @@ func (f *File) VFS() *VFS {
//
// We ignore O_SYNC and O_EXCL
func (f *File) Open(flags int) (fd Handle, err error) {
defer fs.Trace(f, "flags=%s", decodeOpenFlags(flags))("fd=%v, err=%v", &fd, &err)
var (
write bool // if set need write support
read bool // if set need read support