9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] make exportfs give "standard" error for file does exist
@ 2023-07-23 21:07 Jacob Moody
  2023-07-23 22:03 ` Stuart Morrow
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Jacob Moody @ 2023-07-23 21:07 UTC (permalink / raw)
  To: 9front

Certain 9p clients *cough* Guhnew/Linucks *cough* expect a fileserver to give back specifically "file does not exist"
for this certain error case. For linux specifically this results in create being broken. This patch catches this error
and returns back what the broken client would like.

This sucks, telling linux to go kick rocks would also be fine in my opinion.

diff 801664db7f4ed740d40f40f93f1aa4dd48e1c329 uncommitted
--- a//sys/src/cmd/exportfs/exportsrv.c
+++ b//sys/src/cmd/exportfs/exportsrv.c
@@ -198,7 +198,10 @@
 		wf = file(f->f, t->work.wname[i]);
 		if(wf == nil){
 			errstr(err, sizeof err);
-			e = err;
+			if(strstr(err, "does not exist") != nil)
+				e = "file does not exist";
+			else
+				e = err;
 			break;
 		}
     Accept:

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-07-25 13:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 21:07 [9front] [PATCH] make exportfs give "standard" error for file does exist Jacob Moody
2023-07-23 22:03 ` Stuart Morrow
2023-07-23 22:11   ` Jacob Moody
2023-07-23 22:24     ` Stuart Morrow
2023-07-24  0:19       ` Jacob Moody
2023-07-24 21:20         ` Stuart Morrow
2023-07-24 22:33           ` Jacob Moody
2023-07-24  0:07 ` Michael Forney
2023-07-24  0:56   ` Jacob Moody
2023-07-24  2:12   ` ori
2023-07-24  8:13     ` hiro
2023-07-24 23:37       ` Jacob Moody
2023-07-24 23:54         ` ori
2023-07-24  0:51 ` [9front] " Anthony Martin
2023-07-24  1:03   ` Jacob Moody
2023-07-24  4:13     ` Anthony Martin
2023-07-24  4:20       ` ori
2023-07-25  6:09         ` Anthony Martin
2023-07-25  8:26           ` hiro
2023-07-25 13:14           ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).