From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 0A1C57D2F0 for ; Sun, 15 Sep 2019 09:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbfIOJnb (ORCPT ); Sun, 15 Sep 2019 05:43:31 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38076 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfIOJnb (ORCPT ); Sun, 15 Sep 2019 05:43:31 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4F07380ECE; Sun, 15 Sep 2019 11:43:14 +0200 (CEST) Date: Sun, 15 Sep 2019 11:43:06 +0200 From: Pavel Machek To: Rasmus Villemoes Cc: Andrew Morton , Jonathan Corbet , Andy Shevchenko , Joe Perches , Petr Mladek , Sergey Senozhatsky , Jani Nikula , Linux Kernel Mailing List , Uwe Kleine-K??nig , linux-doc@vger.kernel.org Subject: Re: [PATCH v2] printf: add support for printing symbolic error codes Message-ID: <20190915094306.GA1060@bug> References: <20190830214655.6625-1-linux@rasmusvillemoes.dk> <20190909203826.22263-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190909203826.22263-1-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon 2019-09-09 22:38:25, Rasmus Villemoes wrote: > It has been suggested several times to extend vsnprintf() to be able > to convert the numeric value of ENOSPC to print "ENOSPC". This is yet > another attempt. Rather than adding another %p extension, simply teach > plain %p to convert ERR_PTRs. While the primary use case is For the record, I hate manually decoding errors, so I like this patch. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html