From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --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--