From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: *** X-Spam-Status: No, score=3.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_SBL_CSS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 30908 invoked from network); 23 Jul 2023 21:11:07 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 23 Jul 2023 21:11:07 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Sun Jul 23 17:07:06 -0400 2023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1690146616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+2M4fWATrtel0LLJIlZfPMnDz4pv4vT2HhUQJm0d7k=; b=DDcDLMuB6LAs1ErpBcrSfokgmYr5zJWoIQnZEhWd8lU9mIirzqBgPyiOkzSUSVtDgBjENM 0Ivy69G7qdig7Cqm9BbNZ8yIIyQaLkztrogPtzz9QI9FAWeOVOdz3Oj5CMWaYyVJ6EJTWE Qh56VaG4BdEajzkF+UkwrqZGwN0IxSg= Received: from [192.168.168.123] ( [207.45.82.38]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id 25296cbd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Sun, 23 Jul 2023 16:10:16 -0500 (CDT) Message-ID: <71ed8c49-2174-0ec5-ad59-5e1c5256fc70@posixcafe.org> Date: Sun, 23 Jul 2023 16:07:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: 9front@9front.org From: Jacob Moody Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: component package callback information-oriented generator Subject: [9front] [PATCH] make exportfs give "standard" error for file does exist Reply-To: 9front@9front.org Precedence: bulk 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: