Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4390039imm; Mon, 30 Jul 2018 13:50:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpducqEIZ7oUpQlsbZxNWVFD1yCJ4qA7lfZ/FCLkfQz63xwH8f0tHsuqdPxizbIInzNFBMD0 X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr18078472plb.248.1532983839268; Mon, 30 Jul 2018 13:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532983839; cv=none; d=google.com; s=arc-20160816; b=eE1BY/q2/qMiKgaPmZ6PAPC3ocOZuO/204U3tMRwYX9Wfr1nyJOIIk0DIRcMFlswK/ ARAQfR9PNzdXV3XjJiwhlCph2QUxUYDEZLKE81sFjs0Kzhv5vC8rjSugGEJYDmlDUPmR 3cY6Zz82voXPz8zDR+7uBAMusVcsm//hOSnqrmPeWSXOo6h2Wik9ActZh9I0c0iX9B+T 0uazAYu6NPoBHLogX+MpxPwc8LbHWBSXH/2P8Rcoe17UEdGJQpCGLVTbWDmK+s+2bCb0 hgL71sjgeGTS9C4ZCr7/CytQOYWG5wdPI8/LfGnp/IBJE404qTQxecD+mKcoWqUUG525 CqGg== 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=S5Ra1KrYKWJQgIE90UMavUFBdOeX/Jsk5BEqGcKzlRk=; b=uAzNs6voh8zhaI+cysjoBFR/kVSvB9OcOFe8qWZD9WMkC0XwQDlwoRteQ4aHGXXfBE 0+EZ0qQ9PZzr1FmhTgpNGPaCCMGuN5FnkaEspvnXhy3RAKdwZA6WyGayY/R4781s4zn4 Z+rh41eW9ujDmF1WSPTVYo/+92qYWCIMBEOticyT5NkXI93qFzKFOziwPZAn2z07Thfr LDZQ7KrezylGR0BspYV9c7RPyeLrd/WPY/zqtRjAVQW7kCE3qMqaRfyU11SQxuPLwvGY kAWONitNYo/Ap9jyGsve/u/koUCtbw3koZgw6GBYTn8gUucpJvfKT8VbCFL4F+sUrqur COYw== 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 g6-v6si10014937pgq.240.2018.07.30.13.50.01; Mon, 30 Jul 2018 13:50:39 -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 S1731905AbeG3WYY (ORCPT + 99 others); Mon, 30 Jul 2018 18:24:24 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45384 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730613AbeG3WYY (ORCPT ); Mon, 30 Jul 2018 18:24:24 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B761F80676; Mon, 30 Jul 2018 22:47:37 +0200 (CEST) Date: Mon, 30 Jul 2018 22:47:36 +0200 From: Pavel Machek To: Linus Torvalds Cc: Matthew Wilcox , David Howells , Al Viro , linux-fsdevel , Linux Kernel Mailing List Subject: Re: [PATCH 36/38] vfs: Add a sample program for the new mount API [ver #10] Message-ID: <20180730204736.GA4583@amd> 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> <20180730180842.GA5544@bombadil.infradead.org> <20180730183847.GB5544@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: 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 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > But once the string has been generated, it can now be thousands of > different strings, and you can't just look them up from a table any > more. >=20 > Real examples from David's patch-series: >=20 > errorf(fc, "%s: Lookup failure for '%s'", > desc->name, param->key); >=20 > errorf(fc, "%s: Non-blockdev passed to '%s'", > desc->name, param->key); >=20 > which means that by the time user space sees it, you can't just "look > up the string". The string will have various random key names etc in > it. >=20 > But the alternative to pass things as format strings and raw data, and > having all the rules for a "good gettext interface" are worse. It gets > very ugly very quickly. Dunno. Could we pass it as "format string and data formatted as _strings_"? That should be possible to deal with in userspace and not too annoying for the kernel. Userspace would then get something like "e%s: Lookup failure for '%s'\0name>\0key>\0" . Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltfeWgACgkQMOfwapXb+vIC5QCeMwU1CYqIdpj3DtSjCZp66FSM 7C0AoMF0bQ/hguQerPBaaXQpYcGPxRyE =nJGj -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--