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=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14873 invoked from network); 6 Jan 2022 14:20:06 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 6 Jan 2022 14:20:06 -0000 Received: from odoacer.turtle-trading.net ([93.241.193.16]) by 4ess; Thu Jan 6 08:53:06 -0500 2022 Received: from zenobia.turtle-trading.net ([192.168.2.111]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1n5Svh-0004mo-Uj; Thu, 06 Jan 2022 14:35:45 +0100 Received: from benny by zenobia.turtle-trading.net with local (Exim 4.94.2) (envelope-from ) id 1n5Svh-0011g4-MP; Thu, 06 Jan 2022 14:35:45 +0100 From: Benjamin Riefenstahl To: cinap_lenrek@felloff.net Cc: 9front@9front.org References: Date: Thu, 06 Jan 2022 14:35:45 +0100 In-Reply-To: (cinap lenrek's message of "Wed, 05 Jan 2022 20:13:55 +0100") Message-ID: <874k6hc7gu.fsf@turtle-trading.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: encrypted CMS factory SQL over JSON software proxy Subject: Re: [9front] ape/_errno: ENOENT Reply-To: 9front@9front.org Precedence: bulk --=-=-= Content-Type: text/plain Hi cinap, cinap writes: > how's that solving anything? i can't seem to find a "No such file ..." > error to be generated from the kernel or cwfs and hjfs? I could not find it either. I recreated the problem and it seems APE's stat generates that error somehow. See the attached test program (compile with pcc). Maybe the message is somewhere in APE, although I could not find it in /sys/src/ape either. If it is in APE, the errno or the errmsg could be fixed there, of course. Thanks, benny --=-=-= Content-Type: text/x-csrc Content-Disposition: inline; filename=test-enoent.c #define _POSIX_SOURCE #define _PLAN9_SOURCE #include #include #include #include "/sys/src/ape/lib/ap/plan9/sys9.h" int main (void) { struct stat attrs; stat("no-such-file", &attrs); int ecode = errno; char err[100]; _ERRSTR(err, sizeof err); printf("errstr: %s\n", err); switch(ecode) { case ENOENT: printf("errno: ENOENT\n"); break; case EPLAN9: printf("errno: EPLAN9\n"); break; default: printf("errno: %d\n", ecode); break; } return 0; } --=-=-=--