func Bazil2OtaruFlags(bf bfuse.OpenFlags) int { ret := 0 if bf.IsReadOnly() { ret = oflags.O_RDONLY } else if bf.IsWriteOnly() { ret = oflags.O_WRONLY } else if bf.IsReadWrite() { ret = oflags.O_RDWR } if bf&bfuse.OpenAppend != 0 { log.Printf("FIXME: Append not supported yet !!!!!!!!!!!") } if bf&bfuse.OpenCreate != 0 { ret |= oflags.O_CREATE } if bf&bfuse.OpenExclusive != 0 { ret |= oflags.O_EXCL } if bf&bfuse.OpenSync != 0 { log.Printf("FIXME: OpenSync not supported yet !!!!!!!!!!!") } if bf&bfuse.OpenTruncate != 0 { log.Printf("FIXME: OpenTruncate not supported yet !!!!!!!!!!!") } return ret }
func Bazil2OtaruFlags(bf bfuse.OpenFlags) int { ret := 0 if bf.IsReadOnly() { ret = oflags.O_RDONLY } else if bf.IsWriteOnly() { ret = oflags.O_WRONLY } else if bf.IsReadWrite() { ret = oflags.O_RDWR } if bf&bfuse.OpenAppend != 0 { ret |= oflags.O_APPEND } if bf&bfuse.OpenCreate != 0 { ret |= oflags.O_CREATE } if bf&bfuse.OpenExclusive != 0 { ret |= oflags.O_EXCL } if bf&bfuse.OpenSync != 0 { logger.Criticalf(mylog, "FIXME: OpenSync not supported yet !!!!!!!!!!!") } if bf&bfuse.OpenTruncate != 0 { ret |= oflags.O_TRUNCATE } return ret }