commit - 0ac670585c5eac5a6348aeb0e7b018659b2dbc09
commit + e465991ea6c7d2b9f52cabf398b9b087a0b25427
blob - 45041e6652a9c0b830a1f2e3ed604a9a8233f652
blob + c3b4a52f1d9cd37b94488a37dc9bb72fde7f131f
--- src/cmd/9pfuse/main.c
+++ src/cmd/9pfuse/main.c
openmode = flags&3;
flags &= ~3;
flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC);
+ /*
+ * Discarding O_APPEND here is not completely wrong,
+ * because the host kernel will rewrite the offsets
+ * of write system calls for us. That's the best we
+ * can do on Unix anyway.
+ */
+ flags &= ~O_APPEND;
if(flags & O_TRUNC){
openmode |= OTRUNC;
flags &= ~O_TRUNC;
* Could translate but not standard 9P:
* O_DIRECT -> ODIRECT
* O_NONBLOCK -> ONONBLOCK
- * O_APPEND -> OAPPEND
*/
if(flags){
fprint(2, "unexpected open flags %#uo", (uint)in->flags);
openmode = in->flags&3;
flags &= ~3;
flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE);
+ flags &= ~O_APPEND; /* see comment in _fuseopen */
flags &= ~(O_CREAT|O_TRUNC); /* huh? */
if(flags){
fprint(2, "bad mode %#uo\n", in->flags);