Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbdFYVS5 (ORCPT ); Sun, 25 Jun 2017 17:18:57 -0400 Received: from zimbra.gr13.net ([46.4.151.110]:3963 "EHLO zimbra.gr13.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbdFYVS4 (ORCPT ); Sun, 25 Jun 2017 17:18:56 -0400 Subject: Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings To: Joe Perches , linux-kernel@vger.kernel.org References: <20170625171230.7613-1-enrico.weigelt@gr13.net> <1498411624.24295.36.camel@perches.com> <6a12988d-bbcc-54e7-be16-eeeb94f88d57@gr13.net> <1498421449.24295.39.camel@perches.com> From: "Enrico Weigelt, metux IT consult" Message-ID: <71909969-b6be-d116-3372-7add409c1ec1@gr13.net> Date: Sun, 25 Jun 2017 23:18:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1498421449.24295.39.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 487 Lines: 18 On 25.06.2017 22:10, Joe Perches wrote: >> Yeah, that's still an open problem. Actually, I still haven't found out, >> how it's done w/ all the other kernel-internal conversions. > > Everything else uses "%p", hmm, but errno's aren't pointers. Isn't %p checked for pointer values ? >> Already was about to do so. Shall I call it strerror() ? > > I presume kstrerror > > So use something like > "%d: (%s)", errno, kstrerror(errno) Okay, sounds good. --mtx