From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpKvm-0006xb-Rd for qemu-devel@nongnu.org; Mon, 23 Jan 2012 09:31:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpKvg-0001F7-P1 for qemu-devel@nongnu.org; Mon, 23 Jan 2012 09:31:34 -0500 Received: from david.siemens.de ([192.35.17.14]:18041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpKvg-0001ER-AT for qemu-devel@nongnu.org; Mon, 23 Jan 2012 09:31:28 -0500 Message-ID: <4F1D6F39.7070007@siemens.com> Date: Mon, 23 Jan 2012 15:31:21 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <200907171523.52123.Christoph.Egger@amd.com> <0014CB49-6AA0-43C3-9323-C0B38D3E6452@suse.de> In-Reply-To: <0014CB49-6AA0-43C3-9323-C0B38D3E6452@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] signrom.sh: portability fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Egger Cc: Alexander Graf , qemu-devel@nongnu.org On 2009-07-17 16:37, 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? A few lines > below there's another $(( )) that apparently works. Picking up this old topic again: Forking expr in this tight loop is a very bad idea. It makes signing a fairly long running step of the build process for any non-trivial rom (I'm about to add one of those). Can you please provide an example output for the ${nums} variable that used to break for you so that we can find a fork-free algorithm? Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux