All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] signrom.sh: portability fix
Date: Fri, 17 Jul 2009 18:06:13 +0200	[thread overview]
Message-ID: <200907171806.13974.Christoph.Egger@amd.com> (raw)

On Friday 17 July 2009 16:37:38 Alexander Graf wrote:
> On 17.07.2009, at 15:23, Christoph Egger wrote:
> > Hi!
> >
> > Attached patch makes signrom.sh working on NetBSD.
> > The output of the 'od' command leads to a syntax error
> > which breaks the build.
>
> So why replace the $(( ... )) calculation with expr then?

because $i contains some whitespaces and leading zeros.
This lets the bourne shell think, $i is a string and doing math with strings 
results in syntax error.
Passing it down into expr trims them.

> A few lines below there's another $(( )) that apparently works.

$sum is not a string there.

> Btw: Inlined patches are very much appreciated :-)

Not for me because kmail malforms those with tabs,
so that they don't apply cleanly.

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

-------------------------------------------------------

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

             reply	other threads:[~2009-07-20  6:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 16:06 Christoph Egger [this message]
2009-07-20  7:48 ` [Qemu-devel] [PATCH] signrom.sh: portability fix Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2009-07-17 13:23 Christoph Egger
2009-07-17 14:37 ` Alexander Graf
2012-01-23 14:31   ` Jan Kiszka

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=200907171806.13974.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=agraf@suse.de \
    --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.