Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4214143imm; Mon, 30 Jul 2018 10:32:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeq6WM11Rc+e6ftryW8vVfqvNpZFHBmgxvdvTQqj7J80CyWzLNJoti8hfEID/wv4D07jl4t X-Received: by 2002:a17:902:1703:: with SMTP id i3-v6mr16960356pli.263.1532971919984; Mon, 30 Jul 2018 10:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532971919; cv=none; d=google.com; s=arc-20160816; b=pCxz+qwNrCX8YRC1lVTmhvsTxDnfckALgsv+OgxGsFl/gjq2Y/W1C334H+6DJqirib Y06DSt9jJCabpOsZ8NqWdrE14iKxwiweLOQ8vuEmZjaLwFr2WoxVt9PliCLnqQmRsA7B tli0pta7saaR8g7uqgcWsSnPmiXJtgW22lcg/PsB+x2D5FODVbMJ7fXhbGfX7jX0QprT sEzndxL8WhGCBpqoFwiDfmpXp+ylbVWG0Uwd3GDo0GmvCN94oSrCdWXSgu0w+sXkR+RG W4FxxYIhmohNiNBuj2PZTfar7L4cklOpYdT6XsRUhkeSD7TZ1YBbCtnrB9a1AGj9VjeL F8XQ== 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:arc-authentication-results; bh=ASnPD2wbzO9vSad3MH2aOZbe51wClRcg3Eu+QsDVbCg=; b=kvvr+EsuWogVfywqnusLb1KTlt4RXd8df/wqdBSm9EaggYx3d1E0Ir6hJLE+rSe56w OvBej6iJotuCamzrEZvSQ7R6rLegZf+tF1V9KsdXRmlFJgPHOeTgEBkG2+zEUMBQauPm a1AlZBImRCOTEFN2ssC4nycDaPv5G13Faz56TgCjb1Blk8KTor9ycUJFZ/N2sye0FnwN ik2TurJvYjOd2G61MRwKPQqSG5pX39v5J7qwoY6bH9MpGgIG7d5lfnCBYc0FBMl62l8N IbmwcAC5YokbTprnPrnM6eFt9W7XRhS8ou9tVMkzxT5zMtysEiccv+s33Ey4RY49JF2N oO3w== ARC-Authentication-Results: i=1; mx.google.com; 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 s184-v6si11261524pgb.161.2018.07.30.10.31.44; Mon, 30 Jul 2018 10:31:59 -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; 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 S1727119AbeG3TG4 (ORCPT + 99 others); Mon, 30 Jul 2018 15:06:56 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40429 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbeG3TG4 (ORCPT ); Mon, 30 Jul 2018 15:06:56 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 7B1F780662; Mon, 30 Jul 2018 19:30:53 +0200 (CEST) Date: Mon, 30 Jul 2018 19:30:53 +0200 From: Pavel Machek To: David Howells Cc: 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: <20180730173052.GA881@amd> References: <20180730143104.GB24051@amd> <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> <21165.1532964795@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <21165.1532964795@warthog.procyon.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2018-07-30 16:33:15, David Howells wrote: > Pavel Machek wrote: >=20 > > 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). >=20 > Simply returning error numbers is *not* sufficient. The messages need to= be > parameterised. Still userland needs a way to understand the errors. One way is to pass ( "not enough pixie dust (%d too short) on device %s in %s", 123, "foo", "warddrobe" ). But if you pass it as one string, it becomes hard / impossible to parse. (For example if device is named "foo in bar".) Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltfS0wACgkQMOfwapXb+vIk3wCfX+fZLbNSHOPD56IRl20NWUh9 n30AoLAjzvWAym6Q24Riu+oKZiPB6NUC =i5V3 -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--