From patchwork Fri May 19 06:20:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rical Jasan X-Patchwork-Id: 20500 Received: (qmail 30659 invoked by alias); 19 May 2017 06:20:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29362 invoked by uid 89); 19 May 2017 06:20:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=month X-HELO: smtp.pacific.net Subject: Re: [PATCH v3 4/7] manual: Refactor errno @comments. To: Joseph Myers References: <58d7508efdc950d8b6bb53532b290845a9affa9c.1494920105.git.ricaljasan@pacific.net> Cc: libc-alpha@sourceware.org, Carlos O'Donell , Michael Kerrisk From: Rical Jasan Message-ID: Date: Thu, 18 May 2017 23:20:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: On 05/16/2017 09:44 PM, Rical Jasan wrote: > On 05/16/2017 04:06 AM, Joseph Myers wrote: >> On Tue, 16 May 2017, Rical Jasan wrote: >>> errno.texi contains a large number of standards annotations which also >>> document the error string on the same line. The surrounding >>> commentary indicates this information should be retained, so it is >>> moved to the subsequent comment documenting the error code value. In >>> many cases, there was a redundant "@c DO NOT REMOVE" comment, which >>> was relocated to the front. Additionally, a number of "Linux???" >>> standards appeared under a section of the manual stating the following >>> errors came from Linux, so the question marks were removed. >> >> Have you made sure that the generated sysdeps/gnu/errlist.c is unchanged >> by this patch? > > No. > >> And sysdeps/mach/hurd/bits/errno.h (you might need to >> figure out what commands to run by hand for that one, in the absence of a >> way to build a cross compiler and glibc for Hurd). (NaCl also generates >> bits/errno.h - not checked in for NaCl - from errno.texi, but that port >> should be going away soon.) > ... > After hacking on this a bit, I think this patch should be rescinded. ... > like to propose an @errno{} macro to handle these, and then update the > errlist.awks accordingly. Something like: > > @errno{EPERM, 1, Operation not permitted} After pursuing the @errno approach, to address the Hurd issue, I cloned the Mach sources and added (relative to the Mach repo): include/mach/message.h include/mach/kern_return.h include/mach/mig_errors.h include/device/device_types.h along with errno.texi to the errnos.awk command-line. (Those filenames sans-include/ are hardcoded in errnos.awk.) The resultant diff was: so it seems to be equivalent, aside from some new errors (looks like they were added last month). errlist.awk only uses errno.texi, and its output is unchanged. Since NaCl is slated for removal, I haven't touched it. I'll post a v4 soon. Rical --- sysdeps/mach/hurd/bits/errno.h +++ /tmp/errno.h @@ -278,6 +278,8 @@ EKERN_MEMORY_PRESENT = 23, EKERN_WRITE_PROTECTION_FAILURE = 24, EKERN_TERMINATED = 26, + EKERN_TIMEDOUT = 27, + EKERN_INTERRUPTED = 28, /* Errors from . */ EMIG_TYPE_ERROR = -300 /* client type check failure */,