From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id B1EA4388A822 for ; Fri, 3 Jul 2020 21:19:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B1EA4388A822 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-qTHp308POf6La8agXEl9cw-1; Fri, 03 Jul 2020 17:19:31 -0400 X-MC-Unique: qTHp308POf6La8agXEl9cw-1 Received: by mail-qv1-f70.google.com with SMTP id s2so5904909qvn.19 for ; Fri, 03 Jul 2020 14:19:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=4R0G3YnILgdSY3yKxdspU8CGdj/R7sQ+4Pe3bq1kkY0=; b=ajkxg7zzVUGgFo+zfmxo262piK5szjA8VI1+W4PoI1qE0Vi5MG3UTg0bUVg6TTaQmY +M4UMqhD09jqd8DZhOf2Q09xQDupCKWzzwcvcRV/VVn6JlVDGoS9QtYBUo2K0Vx45bLA J7KuIxxP2Tezb8cP0s3JWKhmAi3PlcfQUT5cdt/P3ayKBdITinqBdeZBD1YDjenukIUE G6BB44X4NzsNltdR9oBhqIaERXqj7vIUi7HVYgdTUsrWFfXKmiZAAb3D571/XG12PvEI RCiLOOsRGjMRlBNVk1tcj/ESf2b6GdLSJQayZi2+WHfw6vEXz39wcAlg9rVyaIAM0pbx OCGQ== X-Gm-Message-State: AOAM533NtkX+IQaxOUGvorOBVwEfylEbimFy95JO7Inm/Bs+f5i673Tm xvf5TpNHXuJ8joJteqQoB5FCY5MzSphtMaOANjg3xKwTq1CPfe3RAfZAI3X0bKhbswx/++fIcae QIVuueQhmmrRMRESGs2eh X-Received: by 2002:a37:6382:: with SMTP id x124mr32485659qkb.13.1593811171309; Fri, 03 Jul 2020 14:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlF5KyqwMDbE/dVtUKtQtV2LqoQ5o8nDS0i35WVxTl/03MiY5RvYoeXvSFfjtbMfsVe3jMMw== X-Received: by 2002:a37:6382:: with SMTP id x124mr32485644qkb.13.1593811171059; Fri, 03 Jul 2020 14:19:31 -0700 (PDT) Received: from [192.168.1.4] (198-84-170-103.cpe.teksavvy.com. [198.84.170.103]) by smtp.gmail.com with ESMTPSA id h131sm7134273qke.29.2020.07.03.14.19.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 14:19:30 -0700 (PDT) Subject: Re: [PATCH v5 13/13] string: Add strerrorname and strerrordesc To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20200619134352.297146-1-adhemerval.zanella@linaro.org> <20200619134352.297146-13-adhemerval.zanella@linaro.org> <1a3b968c-0d58-8703-c317-58b32d22501c@redhat.com> From: Carlos O'Donell Organization: Red Hat Message-ID: Date: Fri, 3 Jul 2020 17:19:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 21:19:34 -0000 On 7/3/20 5:01 PM, Adhemerval Zanella wrote: > > > On 02/07/2020 18:43, Carlos O'Donell wrote: >> On 6/19/20 9:43 AM, Adhemerval Zanella wrote: >>> The strerrorname returns error number name (i.g. "EINVAL" for EINVAL) >>> while strerrordesc returns string describing error number (i.g >>> "Invalid argument" for EINVAL). Different than strerror, strerrordesc >>> does not attempt to translate the return description and both functions >>> return NULL for an invalid error number. >>> >>> They should be used instead of sys_errlist and sys_nerr and both are >> >> s/and both/, both/g > > Ack. > >> >>> thread and async-signal safe. These functions are GNU extensions. >>> >>> Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, >>> and s390x-linux-gnu. >> >> Why not strerrorname_np or strerrordesc_np? We don't have to use *_np, >> but these functions are fiarly close in name to 'strerror' and so it >> might be beneficial to use _np at the end, like you did for sigabbrev_np >> and sigdescr_np. Thoughts? > > I don't have a strong preference here, on a patch iteration I used > the the _np suffix and Florian has pointed out the str* namespace > is reserved for libc implementations. > > But I think the _np is slight better to indicate it is an extension. > If it is eventually adopted by other system without the _np suffix > we can easily create an alias. > > So I have added the _np suffix. > >> >> No regression on x86_64 and i686. >> >> Tested-by: Carlos O'Donell > > Should I add the Reviewed-by as well? No. I want to review the final patch and I'll give Reviewed-by there. -- Cheers, Carlos.