From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeeq-0006Dg-2H for qemu-devel@nongnu.org; Thu, 24 Nov 2011 14:08:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTeeo-0005ph-Lp for qemu-devel@nongnu.org; Thu, 24 Nov 2011 14:08:28 -0500 Received: from cantor2.suse.de ([195.135.220.15]:54098 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeeo-0005pD-Gw for qemu-devel@nongnu.org; Thu, 24 Nov 2011 14:08:26 -0500 Message-ID: <4ECE9606.2090509@suse.de> Date: Thu, 24 Nov 2011 20:07:50 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2 0/4] imx.31 and KZM board support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Chubb Cc: Peter Maydell , =?ISO-8859-1?Q?Andreas_F=E4?= =?ISO-8859-1?Q?rber?= , qemu-devel@nongnu.org Am 23.11.2011 01:51, schrieb Peter Chubb: >>>>>> "Peter" =3D=3D Peter Chubb writes: >=20 >=20 > Peter> All comments received so far have been addressed --- I've added > Peter> a macro, `scream' that gives at most 10 lines of output for OS > Peter> error reporting. >=20 > Except I noticed a thinko in the macro. The decrement should be > inside the guard, thus: >=20 > #define scream(fmt, args...) \ > do { \ > static int printable =3D 10;\ > if (printable) { \ > printable--;\ > fprintf(stderr, fmt, ##args); \ > } \ > } while (0) Another issue: scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("black"); scream("red"); To show us "red", in addition to the integer count a duplicate of the string contents would need to be stored and compared to the newly formatted string. If we want to do this, it should go into a central file so that it can be reused and centrally maintained. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg