From nobody Wed Apr 2 06:48:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551848157576896.4208491797604; Tue, 5 Mar 2019 20:55:57 -0800 (PST) Received: from localhost ([127.0.0.1]:54366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Oas-0003kf-EX for importer@patchew.org; Tue, 05 Mar 2019 23:55:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1OZg-00034Y-0q for qemu-devel@nongnu.org; Tue, 05 Mar 2019 23:54:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1OZf-0006Ml-2h for qemu-devel@nongnu.org; Tue, 05 Mar 2019 23:54:35 -0500 Received: from smtp.lg.ehu.es ([158.227.0.66]:56736 helo=smtp.ehu.eus) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1OZe-0006Lf-OK for qemu-devel@nongnu.org; Tue, 05 Mar 2019 23:54:35 -0500 Received: from imsva2.lgp.ehu.es (imsva2.lgp.ehu.es [10.0.3.246]) by postfix.smtp2.imsva2 (Postfix) with ESMTPS id EF11D6400; Wed, 6 Mar 2019 05:54:31 +0100 (CET) Received: from imsva2.lgp.ehu.es (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B041E5A04F; Wed, 6 Mar 2019 05:54:31 +0100 (CET) Received: from imsva2.lgp.ehu.es (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A56035A045; Wed, 6 Mar 2019 05:54:31 +0100 (CET) Received: from smtp.ehu.eus (unknown [10.0.100.76]) by imsva2.lgp.ehu.es (Postfix) with ESMTPS; Wed, 6 Mar 2019 05:54:31 +0100 (CET) Received: from 03612eec87fc (unknown [139.47.78.33]) by smtp2 (Postfix) with ESMTPSA id 62B716400; Wed, 6 Mar 2019 05:54:31 +0100 (CET) Date: Wed, 6 Mar 2019 04:54:32 +0000 From: Unai Martinez-Corral To: qemu-devel@nongnu.org Message-ID: <20190306045432.GI75@03612eec87fc> References: <20190306031221.GA53@03612eec87fc> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190306031221.GA53@03612eec87fc> User-Agent: Mutt/1.11.2 (2019-01-07) X-Greylist: ACL 174 matched, not delayed by milter-greylist-4.4.3 (smtp2); Wed, 06 Mar 2019 05:54:31 +0100 (CET) X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1631-8.2.0.1013-24472.004 X-TM-AS-Result: No--2.280-7.0-31-10 X-imss-scan-details: No--2.280-7.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1631-8.2.1013-24472.004 X-TMASE-Result: 10--2.280100-10.000000 X-TMASE-MatchedRID: mZljRXDwq+48mRT0SYY6frMjW/sniEQKUXlp1FHYSPVcKZwALwMGs0hh ikD15t6mUnDDud66KYyvXn8ZlTtgDFhq/B0ZZyJ49Jn/ZrGuc8F/aDoolm3GXY3EVvTKniav4nm g1woDU7Yr+Flpb471nyjqKQQTMLsBnpTuOg/W2Y4G1NkcAmdR4LuesBT0pDFRrY9uF6odMlznKb VxJ/Gd2JV1h6NLPYn+AlsypQZbPISXBXaJoB9JZ/7E6GNqs6ceXrupZTqDOwZ5w0EauQomR/cUt 5lc1lLgKIzdZS3ou0UdRyYZEqEQsMnH90d6JHlmvkvCS6PUZlZjop3s8OJ51VWlC8pp6OTJpDdh bOxooC3kc6f3X49/NvFwo0qzRNLoEttof7Ek2gLpn6fQaYYfBmEZXwGzbQsWLOeM/yNfYDlTaHi WCdz6+g== X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 X-Greylist: Sender IP whitelisted, Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (postfix.smtp2.imsva2); Wed, 06 Mar 2019 05:54:31 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 158.227.0.66 Subject: [Qemu-devel] [PATCH v3 9/10] qemu-binfmt-conf.sh: update usage() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reduce indentation to better use available space. Add list of supported environment variables and their default values. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 61 ++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 4a45636b53..8ca2647ed0 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -201,34 +201,31 @@ Usage: qemu-binfmt-conf.sh [--help][--path PATH][--su= ffix SUFFIX] [--persistent][--credential][--exportdir PATH] [--reset ARCHS][--systemd][--debian][CPUS] - Configure binfmt_misc to use qemu interpreter for the given CPUS. - Supported formats for CPUS are: single arch or comma/space separate= d list. - See QEMU target list below. If CPUS is 'ALL' or empty, configure al= l known - cpus. If CPUS is 'NONE', no interpreter is configured. + Configure binfmt_misc to use qemu interpreter for the given CPUS. + Supported formats for CPUS are: single arch or comma/space separated l= ist. + See QEMU target list below. If CPUS is 'ALL' or empty, configure all k= nown + cpus. If CPUS is 'NONE', no interpreter is configured. - --help: display this usage - --path: set path to qemu interpreter ($QEMU_PATH) - --suffix: add a suffix to the default interpreter name - ($QEMU_SUFFIX) - --persistent: if present, the interpreter is loaded when binfmt is - configured and remains in memory. All future uses - are cloned from the open file. - ($QEMU_PERSISTENT=3Dyes) - --credential: if present, credential and security tokens are - calculated according to the binary to interpret - ($QEMU_CREDENTIAL=3Dyes) - --exportdir: define where to write configuration files - (default: $SYSTEMDDIR or $DEBIANDIR) - --reset: remove registered interpreter for target ARCHS (comma - separated list). If ARCHS is 'ALL', remove all regis= tered - 'qemu-*' interpreters. - --systemd: don't write into /proc, - instead generate file for systemd-binfmt.service; - environment variable HOST_ARCH allows to override 'u= name' - to generate configuration files for a different - architecture than the current one. - --debian: don't write into /proc, - instead generate update-binfmts templates + --help: display this usage. + --path: set path to qemu interpreter. + --suffix: add a suffix to the default interpreter name. + --persistent: if present, the interpreter is loaded when binfmt is + configured and remains in memory. All future uses + are cloned from the open file. + --credential: if present, credential and security tokens are + calculated according to the binary to interpret. + --exportdir: define where to write configuration files. + (default: $SYSTEMDDIR or $DEBIANDIR) + --reset: remove registered interpreter for target ARCHS (comma + separated list). If ARCHS is 'ALL', remove all register= ed + 'qemu-*' interpreters. + --systemd: don't write into /proc, + instead generate file(s) for systemd-binfmt.service; + environment variable HOST_ARCH allows to override 'unam= e' + to generate configuration files for a different + architecture than the current one. + --debian: don't write into /proc, + instead generate update-binfmts templates. To import templates with update-binfmts, use : @@ -240,6 +237,14 @@ Usage: qemu-binfmt-conf.sh [--help][--path PATH][--suf= fix SUFFIX] QEMU target list: $qemu_target_list + Options 'path, 'suffix', 'persistent' and 'credential' are also suppor= ted + through environment variables. Defaults are: + + QEMU_PATH=3D/usr/local/bin + QEMU_SUFFIX=3D + QEMU_PERSISTENT=3Dno + QEMU_CREDENTIAL=3Dno + EOF } @@ -384,8 +389,8 @@ DEBIANDIR=3D"/usr/share/binfmts" QEMU_PATH=3D"${QEMU_PATH:-/usr/local/bin}" QEMU_SUFFIX=3D"${QEMU_SUFFIX:-}" -QEMU_CREDENTIAL=3D"${QEMU_CREDENTIAL:-no}" QEMU_PERSISTENT=3D"${QEMU_PERSISTENT:-no}" +QEMU_CREDENTIAL=3D"${QEMU_CREDENTIAL:-no}" options=3D$(getopt -o r:dsQ:S:e:hcp -l reset:,debian,systemd,path:,suffix:= ,exportdir:,help,credential,persistent -- "$@") eval set -- "$options" -- 2.20.1