From patchwork Mon Mar 11 10:31:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Unai Martinez Corral X-Patchwork-Id: 1054362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ehu.eus Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Hw6S1RFjz9s00 for ; Mon, 11 Mar 2019 21:57:20 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3IcQ-0004rh-4e for incoming@patchwork.ozlabs.org; Mon, 11 Mar 2019 06:57:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3IDh-0000sj-HN for qemu-devel@nongnu.org; Mon, 11 Mar 2019 06:31:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3IDf-00029x-J5 for qemu-devel@nongnu.org; Mon, 11 Mar 2019 06:31:45 -0400 Received: from smtp.lg.ehu.es ([158.227.0.66]:2981 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 1h3IDd-00025A-Jj for qemu-devel@nongnu.org; Mon, 11 Mar 2019 06:31:43 -0400 Received: from imsva1.lgp.ehu.es (imsva1.lgp.ehu.es [10.0.3.245]) by postfix.smtp1.imsva1 (Postfix) with ESMTPS id 616833543B; Mon, 11 Mar 2019 11:31:39 +0100 (CET) Received: from imsva1.lgp.ehu.es (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3369F11004A; Mon, 11 Mar 2019 11:31:39 +0100 (CET) Received: from imsva1.lgp.ehu.es (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 27888110045; Mon, 11 Mar 2019 11:31:39 +0100 (CET) Received: from smtp.ehu.eus (unknown [10.0.100.73]) by imsva1.lgp.ehu.es (Postfix) with ESMTPS; Mon, 11 Mar 2019 11:31:39 +0100 (CET) Received: from 765644dd90e5 (unknown [139.47.78.33]) by smtp1 (Postfix) with ESMTPSA id D00023F371; Mon, 11 Mar 2019 11:31:38 +0100 (CET) Date: Mon, 11 Mar 2019 10:31:40 +0000 From: Unai Martinez-Corral To: qemu-devel@nongnu.org Message-ID: <20190311103140.GH16@765644dd90e5> References: <20190311101428.GA11@765644dd90e5> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190311101428.GA11@765644dd90e5> User-Agent: Mutt/1.11.2 (2019-01-07) X-Greylist: ACL 177 matched, not delayed by milter-greylist-4.4.3 (smtp1); Mon, 11 Mar 2019 11:31:39 +0100 (CET) X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1631-8.2.0.1013-24482.007 X-TM-AS-Result: No--0.515-7.0-31-10 X-imss-scan-details: No--0.515-7.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1631-8.2.1013-24482.007 X-TMASE-Result: 10--0.514600-10.000000 X-TMASE-MatchedRID: AvuQOGDihJo8mRT0SYY6fvGSfx66m+aMYu7s3QSSN+QAIXlMppp3X9j3 ZmXrgmMgZTpRzmI1jSY+cd7QtHST5EEXheUXJvLH3fn7n/ZHGqZhBfGxmdHCgq2PbheqHTJcaVh esZ7vVuWWEuuopHrw3tA0BAkvqUqCW4r09uGjIu0SEYfcJF0pRbI1wQlMokYmoN1ZeaPfSbijxY yRBa/qJeko2t9ghSAshzImjrjZJG3dB/CxWTRRu+rAZ8KTspSzxuRUMxKXGY6vx96pKLncYEA6w j8PD0Fp3x/L6V87NEyHba3QFZrbgLZ3wh/cn41O9sksA03v4xJ0BOCtADI2rw5s7nHxQ/wZbHxL SfFOFqWcG7vai9PYX+Lxq29NAHjaTN08WrWBwjN+3BndfXUhXQ== 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.smtp1.imsva1); Mon, 11 Mar 2019 11:31:39 +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 v4 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: alex.bennee@linaro.org, riku.voipio@iki.fi, laurent@vivier.eu Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reorder how the options are presented to the user. Move 'systemd' and 'debian' to the end, so that the latter is close to the additional comments and example commands about it. Add list of default values for environment variables. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) -- 2.21.0 diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 07d1ee1f04..a516181a3a 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -201,19 +201,27 @@ TARGETS QEMU_TARGETS A single arch name or a list of them (see -h|--help display this usage -Q|--path PATH: QEMU_PATH set path to qemu interpreter(s) -F|--suffix SUFFIX: QEMU_SUFFIX add a suffix to the default interpreter name --d|--debian: don't write into /proc, generate update-binfmts templates --s|--systemd: don't write into /proc, generate file(s) for - systemd-binfmt.service; environment variable HOST_ARCH - allows to override 'uname' to generate configuration files - for a different architecture than the current one. +-p|--persistent: QEMU_PERSISTENT (yes) load the interpreter and keep it in memory; all future + uses are cloned from the open file. +-c|--credential: QEMU_CREDENTIAL (yes) credential and security tokens are calculated according + to the binary to interpret -e|--exportdir PATH: DEBIANDIR define where to write configuration files SYSTEMDDIR -c|--clear: QEMU_CLEAR (yes) remove registered interpreters for target TARGETS; then exit. --c|--credential: QEMU_CREDENTIAL (yes) credential and security tokens are calculated according - to the binary to interpret --p|--persistent: QEMU_PERSISTENT (yes) load the interpreter and keep it in memory; all future - uses are cloned from the open file. +-s|--systemd: don't write into /proc, generate file(s) for + systemd-binfmt.service; environment variable HOST_ARCH + allows to override 'uname' to generate configuration files + for a different architecture than the current one. +-d|--debian: don't write into /proc, generate update-binfmts templates + +Defaults: +QEMU_TARGETS=$QEMU_TARGETS +QEMU_PATH=$QEMU_PATH +QEMU_SUFFIX=$QEMU_SUFFIX +QEMU_PERSISTENT=$QEMU_PERSISTENT +QEMU_CREDENTIAL=$QEMU_CREDENTIAL +QEMU_CLEAR=$QEMU_CLEAR To import templates with update-binfmts, use : @@ -365,8 +373,8 @@ DEBIANDIR="/usr/share/binfmts" QEMU_TARGETS="${QEMU_TARGETS:-}" QEMU_PATH="${QEMU_PATH:-/usr/local/bin}" QEMU_SUFFIX="${QEMU_SUFFIX:-}" -QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}" QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}" +QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}" QEMU_CLEAR="${QEMU_CLEAR:-no}" options=$(getopt -o cdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")