Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4253718imm; Mon, 30 Jul 2018 11:10:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpceCED3bCiB/APW9t+LyjPdISvzOa9N+Q4JqlhpwDQwF60TK1djVk5ziCsPZaOAHV6T+XxY X-Received: by 2002:a17:902:48c8:: with SMTP id u8-v6mr17473608plh.152.1532974248453; Mon, 30 Jul 2018 11:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532974248; cv=none; d=google.com; s=arc-20160816; b=oK9woH/OY2LDIAKqyAbKJDbEKuQIxhePiUXQf6j5CZNXSXglh3Qatee0tgKmr3j6p3 TfBNqpS+7/HyG628ttEPGgeGhd1n/Pceh5cByiRypZMpAWxxFgVtg4Hs68dnhFJWFW2t NiqxA1qjCN9VVOCv651bMIX5PSZ3MSzbYsqZB2MRT1+caDDuas41q+CN3NYSKZBagozG TYnkvPiWTbo+CGyVi51zQuYCgeC07kfcoXDw9jcexZk5iASJqcyv7eRwZKmtDUMRaGi6 fC/os08N9TofEI7GI/uhdJ8FbdlTcmSz1eq9t5g4MsXtBhKfBDG7er39oh2m74AwtnC9 epxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=R5jWr0kJNTH0P4xkwawvkWxp4H7LVV3lUV6KNhSF/fg=; b=NJYr9+iW/QMdGrQiSh4td4DgbmgsSTh7d39/IQ3DlL7IPqnuCg+90n7niWwCff4OHU IUgyfMMbA5/7rzwIjJ72qoq+XRU5OeOR88wjotage4l2s6HLIzcpP+0hbu4EbzgbRJOw u5TwmeMXjZg/A8AkQ29ek2Bi6zyflP94h66xADacV+gYXmx1tw1saFBeBBEYB+Ipd/x/ AOn0xNAVZSAPiC0zyF/AY3meijKFdNskxdI2gjrqoC1kUqtXrRvOnrLJTnKNprYlC9cS mXLkUBzfP3bQ+xIleNMtTnpkTASNIUA0cIn/AmcSBuvb1QmjYKQ57d23C2y4UEwJLKu8 i05A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UaTkw9gp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16-v6si11904803pgg.538.2018.07.30.11.10.34; Mon, 30 Jul 2018 11:10:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UaTkw9gp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732037AbeG3To4 (ORCPT + 99 others); Mon, 30 Jul 2018 15:44:56 -0400 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=R5jWr0kJNTH0P4xkwawvkWxp4H7LVV3lUV6KNhSF/fg=; b=UaTkw9gpe6gJRmW/1e77v/QxH 6Z4aIuJQrITOHSqGnJ4iUW6dGKNlDhcGZgW3kevaeNrcCCIUBfv+mc+rRsmutWKj9sLkAxJEZEICP NUd9TC+p3VHwhjHv1pvqMQRjhFE7vxZri9rlBSePCFDHI5MYvCT8USC/lwYFAnDjoTioRdUoupaMY IPlBKlVCOpkpz7QLLyGafjYIWCz8MvyctNXBCylEdh5nB/E39UzzaM2nJc0sMwHt/T2m6USxwXuir Hah980BBsUqqyr21EoQIh87/8pU3jkLlXVLTPf6EvKePGg4/go6LQWOnTRVF4TKVQG9zJ4NRIUnSV x3FFKI2og==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkCb4-0005pK-Th; Mon, 30 Jul 2018 18:08:42 +0000 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> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!