Skip to contentSkip to conversation

scripts/qemu-binfmt-conf.sh: Fix shell syntax

PATCH Applied Andreas Färber 3 participants 3 messages May 7, 2012 – May 8, 2012 exec and binfmt

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/qemu-binfmt-conf.sh: Fix shell syntax

The script is organized as a sequence of binfmt registrations, with a check whether the to be registered architecture matches the host.

Add a missing fi for the SuperH section.

---
 scripts/qemu-binfmt-conf.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/qemu-binfmt-conf.sh +1 -0
index 83a44d8..0da2618 100644
@@ -63,6 +63,7 @@ fi
 if [ $cpu != "sh" ] ; then
     echo    ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
     echo    ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
+fi
 if [ $cpu != "s390x" ] ; then
     echo   ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register
 fi
Signature · 1 line
1.7.7
Reviewed-by on v1 1/1
#1 lore raw

Il 07/05/2012 19:47, Andreas Färber ha scritto:

Quoted 16 lines

The script is organized as a sequence of binfmt registrations, with a check whether the to be registered architecture matches the host.

Add a missing fi for the SuperH section.

---
 scripts/qemu-binfmt-conf.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/qemu-binfmt-conf.sh +0 -0
index 83a44d8..0da2618 100644

scripts/qemu-binfmt-conf.sh fi · line 69

Quoted 7 lines
scripts/qemu-binfmt-conf.sh +1 -0
@@ -63,6 +63,7 @@ fi
 if [ $cpu != "sh" ] ; then
     echo    ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
     echo    ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
+fi
 if [ $cpu != "s390x" ] ; then
     echo   ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register
 fi

FWIW, in Fedora I changed qemu-binfmt-conf.sh to use systemd's embedded ability to register binfmt_misc file formats. I couldn't push it upstream because half of it is in the spec file, but you're welcome to lift it into OpenSUSE.

Paolo

#2 lore raw
In reply to Andreas Färber
Quoted 7 lines · Andreas Färber

The script is organized as a sequence of binfmt registrations, with a check whether the to be registered architecture matches the host.

Add a missing fi for the SuperH section.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 16 lines
---
  scripts/qemu-binfmt-conf.sh |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
scripts/qemu-binfmt-conf.sh +1 -0
index 83a44d8..0da2618 100644
@@ -63,6 +63,7 @@ fi
  if [ $cpu != "sh" ] ; then
      echo    ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:'>  /proc/sys/fs/binfmt_misc/register
      echo    ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:'>  /proc/sys/fs/binfmt_misc/register
+fi
  if [ $cpu != "s390x" ] ; then
      echo   ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x:'>  /proc/sys/fs/binfmt_misc/register
  fi