Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit master 1/1] genext2fs.sh: improve number of blocks calculation
Date: Thu, 30 Dec 2010 23:40:05 +0100	[thread overview]
Message-ID: <8762uahol6.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <201012302331.49472.yann.morin.1998@anciens.enib.fr> (Yann E. MORIN's message of "Thu, 30 Dec 2010 23:31:48 +0100")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> Peter, All,
 Yann> On Thursday 30 December 2010 23:10:21 Peter Korsgaard wrote:
 >> +    BLOCKS=$(expr 500 + \( $BLOCKS + $INODES / 8 \) \* 11 / 10)

 Yann> POSIX specifies that you can do arithmetics in the shell:

 Yann> So I'd write that as:

 Yann>   BLOCKS=$(( 500 + (BLOCKS+INODES/8) * 11 / 10 ))

True. I kept it with expr as that's what the rest of the file was doing,
and I didn't find it too bad regarding readability.

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2010-12-30 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 22:10 [Buildroot] [git commit master 1/1] genext2fs.sh: improve number of blocks calculation Peter Korsgaard
2010-12-30 22:31 ` Yann E. MORIN
2010-12-30 22:40   ` Peter Korsgaard [this message]

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=8762uahol6.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox