From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:59844 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730513AbeG3To4 (ORCPT ); Mon, 30 Jul 2018 15:44:56 -0400 Date: Mon, 30 Jul 2018 11:08:42 -0700 From: Matthew Wilcox To: Pavel Machek Cc: David Howells , viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 36/38] vfs: Add a sample program for the new mount API [ver #10] Message-ID: <20180730180842.GA5544@bombadil.infradead.org> References: <20180729113749.GA7333@amd> <153271267980.9458.7640156373438016898.stgit@warthog.procyon.org.uk> <153271292330.9458.14583488053811372222.stgit@warthog.procyon.org.uk> <25489.1532953411@warthog.procyon.org.uk> <20180730143104.GB24051@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730143104.GB24051@amd> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jul 30, 2018 at 04:31:04PM +0200, Pavel Machek wrote: > Well, I guess errors should have numbers, and catalog explaining what > error means what. That way userspace can translate, and it is what we > do with errno. > > I believe numbers are best. If you hate numbers, you can still use > strings, as long as you can enumerate them in docs (but it will be > strange design). Have you looked at how gettext() works? It uses the english text as a search string and replaces it with the localised string. This is a very common design!