From nobody Mon May 6 22:40:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152050624633387.9437846050522; Thu, 8 Mar 2018 02:50:46 -0800 (PST) Received: from localhost ([::1]:37937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ett8H-0001aa-C3 for importer@patchew.org; Thu, 08 Mar 2018 05:50:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ett7Q-0001Cn-0q for qemu-devel@nongnu.org; Thu, 08 Mar 2018 05:49:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ett7M-00023E-4T for qemu-devel@nongnu.org; Thu, 08 Mar 2018 05:49:52 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:33293) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ett7L-00022T-Rr for qemu-devel@nongnu.org; Thu, 08 Mar 2018 05:49:48 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LkySz-1eLeE83Lsr-00airg; Thu, 08 Mar 2018 11:49:38 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 8 Mar 2018 11:48:59 +0100 Message-Id: <20180308104859.3315-1-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 X-Provags-ID: V03:K0:ueeYrDDkHUtl3z+eub9U+/Az/SaawUNMqq15LmJnFu1Dk6dKKYZ DacwnZCjRnAFS/P91XeOsVMPPkSYnZkYTGlqei9i8y20nKse5ohBwkCZLRpSP5Blhg5KS1o /7bglsIYrJgxISchfhp7i7+yhdiqoKA21yYWiFeVE479a0aA2T031M8LKBTEq1onZDRmAgD WhPHrq9qI+GLq1X4r2Yow== X-UI-Out-Filterresults: notjunk:1;V01:K0:Q4n9nhJMP/U=:K6djNhgZcflnqHqziYXLql eIAyWknW306P4zmilOyqxvtPXQfs0Eget/xwEtkC3hS5NRMgraMnvGPqAWbtQaE9FsxpxZdAe c+kiX7canjSHR3PVRgtHJ232+bxDnHOf3Ra3oMaNChcd10VkskWR9fCdfjDwtMf+DtCFBXN67 EWBpcB3m+y82qvW3epngAuK17a4XlZwO768UEF5V5v+0Bx5n+FqBtp7mzCTAOz4YLcp2f1A3D k8mxNg9xuJTIkyMQqrSxDbEKlVcb75ZPdwiu3++FpDz3DtmIr+227bQQAaJIltZcVA5aF2RS8 n6KNWvkdZOMVIbgUu9ohwHcerxIJbjQh0lPQgLkSFl85DBLCHENA+f7qsZzhd/Di/OZTlB426 WiTCeMJSAg7sDzViT04uMIVTfdcVx/AMhdbdPySPkBC/Yxp448mUZC+HNqh7snhoC7dE0eps4 DQTEOX2QAWGmCIZ8dlHSWQ2j4+o8sLnRmGPREwryTSHoKnwYBbqmdqhZPaFNB3Dp2rd5fITz1 04QRxyZwKYgw49ufbsV1rBquTaZI87p+cNJs75piMgqej3Fbvim/BNzTFZms8i1RHeTcX8BJ/ dIKNqCJCrPVuBffo0bWXUcjIb8gRh+J0OSuONptKRBUP/Vw8fK4Rxnkv+FX91AbFzHXKFG1or KDNvx1eLXoUiVxbQAXln+CV+ol/p0mKDlJ535D4mmkIlqVAfBIf5rpWbBlFsJsyRcfWCFapLh bkJ4pivVF/n6tVPZu5shy4Dn042TP6NWvA0OyA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PATCH] linux-user: allows to use "--systemd ALL" with qemu-binfmt-conf.sh 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 , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" qemu-binfmt-conf.sh when it is used with systemd needs to know for which CPU the systemd-binfmt.service file must be created (i.e. "--systemd ppc"). But sometime, for instance for test purpose, we need to create an entry for all known architectures. This patch entroduce the "ALL" parameter for this purpose. Signed-off-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index ea5a748745..7c86d857a1 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -143,7 +143,8 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian]= [--systemd CPU] instead generate update-binfmts templates --systemd: don't write into /proc, instead generate file for systemd-binfmt.service - for the given CPU + for the given CPU. If CPU is "ALL", generate a + file for all known cpus --exportdir: define where to write configuration files (default: $SYSTEMDDIR or $DEBIANDIR) --credential: if yes, credential and security tokens are @@ -290,18 +291,20 @@ while true ; do EXPORTDIR=3D${EXPORTDIR:-$SYSTEMDDIR} shift # check given cpu is in the supported CPU list - for cpu in ${qemu_target_list} ; do + if [ "$1" !=3D "ALL" ] ; then + for cpu in ${qemu_target_list} ; do + if [ "$cpu" =3D "$1" ] ; then + break + fi + done + if [ "$cpu" =3D "$1" ] ; then - break + qemu_target_list=3D"$1" + else + echo "ERROR: unknown CPU \"$1\"" 1>&2 + usage + exit 1 fi - done - - if [ "$cpu" =3D "$1" ] ; then - qemu_target_list=3D"$1" - else - echo "ERROR: unknown CPU \"$1\"" 1>&2 - usage - exit 1 fi ;; -Q|--qemu-path) --=20 2.14.3