All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent@vivier.eu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1817239] [NEW] add '--targets' option to qemu-binfmt-conf.sh
Date: Fri, 22 Feb 2019 07:32:57 -0000	[thread overview]
Message-ID: <5a86f68a-de14-b21c-01eb-174c802cc299@vivier.eu> (raw)
In-Reply-To: 155080581544.22842.8774442486795126526.malonedeb@wampee.canonical.com

On 22/02/2019 04:31, Launchpad Bug Tracker wrote:
> I'd like to ask for the addition of option '--targets' to scripts/qemu-
> binfmt-conf.sh, in order to allow registering the interpreters for the
> given list of architectures only, instead of using all of the ones
> defined in qemu_target_list. The following is a possible patch that
> implements it:
> 
>   qemu-binfmt-conf.sh | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)

Please send your patch to the qemu-devel mailing list.

I think it's a good idea but we should homogenize "--debian" and 
"--systemd": remove the parameter from  "--systemd" to generate by 
default all the targets, and allow the user to provide a subset of the 
targets using the newly introduced "--target" parameter.

Thanks,
Laurent

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1817239

Title:
  add '--targets' option to qemu-binfmt-conf.sh

Status in QEMU:
  New

Bug description:
  I'd like to ask for the addition of option '--targets' to scripts
  /qemu-binfmt-conf.sh, in order to allow registering the interpreters
  for the given list of architectures only, instead of using all of the
  ones defined in qemu_target_list. The following is a possible patch
  that implements it:

   qemu-binfmt-conf.sh | 9 ++++++++-
   1 file changed, 8 insertions(+), 1 deletion(-)

  diff --git a/qemu-binfmt-conf.sh b/qemu-binfmt-conf.sh
  index b5a1674..be4a19b 100644
  --- a/qemu-binfmt-conf.sh
  +++ b/qemu-binfmt-conf.sh
  @@ -170,6 +170,7 @@ usage() {
   Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
                              [--help][--credential yes|no][--exportdir PATH]
                              [--persistent yes|no][--qemu-suffix SUFFIX]
  +                           [--targets TARGETS]

          Configure binfmt_misc to use qemu interpreter

  @@ -189,6 +190,8 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
          --persistent:  if yes, the interpreter is loaded when binfmt is
                         configured and remains in memory. All future uses
                         are cloned from the open file.
  +       --targets:     comma-separated list of targets. If provided, only
  +                      the targets in the list are registered.

       To import templates with update-binfmts, use :

  @@ -324,7 +327,7 @@ CREDENTIAL=no
   PERSISTENT=no
   QEMU_SUFFIX=""

  -options=$(getopt -o ds:Q:S:e:hc:p: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent: -- "$@")
  +options=$(getopt -o ds:Q:S:e:hc:p:t: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent:,targets: -- "$@")
   eval set -- "$options"

   while true ; do
  @@ -380,6 +383,10 @@ while true ; do
           shift
           PERSISTENT="$1"
           ;;
  +    -t|--targets)
  +        shift
  +        qemu_target_list="$(echo "$1" | tr ',' ' ')"
  +        ;;
       *)
           break
           ;;
  --
  2.20.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1817239/+subscriptions

  reply	other threads:[~2019-02-22  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  3:23 [Qemu-devel] [Bug 1817239] [NEW] add '--targets' option to qemu-binfmt-conf.sh umarcor
2019-02-22  7:32 ` Laurent Vivier [this message]
2019-03-09  1:35 ` [Qemu-devel] [Bug 1817239] " umarcor
2020-11-04 23:04 ` John Snow
2021-04-20  8:21 ` Thomas Huth
2021-06-20  4:17 ` Launchpad Bug Tracker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a86f68a-de14-b21c-01eb-174c802cc299@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=1817239@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.