droyo / styx

Go library for the 9P filesystem protocol
MIT License
64 stars 18 forks source link

styx.Topen.Flag does not perserve os.O_APPEND flag #11

Closed majiru closed 5 years ago

majiru commented 5 years ago

When mode is signaled to include os.O_APPEND, the flag is lost when received by a Serve9P function.

Example output with a client opening with os.O_APPEND, the log output is from a log.Printf("%q\n", t.Flag) with t being an incoming styx.Topen

→ 043 Topen fid=1496 mode=01
2019/05/06 17:46:31 '\x00'
majiru commented 5 years ago

Reading more, it seems that O_APPEND isn't an open mode with 9p.

I had assumed it was based on the mention here https://github.com/droyo/styx/blob/master/request.go#L108.