From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E4BDC43142 for ; Mon, 30 Jul 2018 20:47:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 578A720857 for ; Mon, 30 Jul 2018 20:47:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 578A720857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731912AbeG3WYY (ORCPT ); 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--