From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ROpGs-0000k9-3W for barebox@lists.infradead.org; Fri, 11 Nov 2011 11:27:47 +0000 Date: Fri, 11 Nov 2011 12:27:38 +0100 From: Sascha Hauer Message-ID: <20111111112738.GQ16886@pengutronix.de> References: <1320874797-14270-1-git-send-email-lucas.demarchi@profusion.mobi> <1320874797-14270-2-git-send-email-lucas.demarchi@profusion.mobi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1320874797-14270-2-git-send-email-lucas.demarchi@profusion.mobi> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/4] Make fprintf return number of bytes written To: Lucas De Marchi Cc: barebox@lists.infradead.org T24gV2VkLCBOb3YgMDksIDIwMTEgYXQgMDc6Mzk6NTRQTSAtMDIwMCwgTHVjYXMgRGUgTWFyY2hp IHdyb3RlOgo+IFJldHVybiBudW1iZXIgb2YgYnl0ZXMgd3JpdHRlbiwgbGlrZSBpdHMgc2libGlu Z3MgZnVuY3Rpb24uIFRoaXMgYWxzbwo+IHJlbW92ZXMgdGhlIHdhcm5pbmcgYmVsb3cgb24gZ2Nj ID49IDQuNi4KPiAKPiBjb21tb24vY29uc29sZS5jOjMzMzo3OiB3YXJuaW5nOiB2YXJpYWJsZSDi gJhp4oCZIHNldCBidXQgbm90IHVzZWQKPiBbLVd1bnVzZWQtYnV0LXNldC12YXJpYWJsZV0KPiAK PiBTaWduZWQtb2ZmLWJ5OiBMdWNhcyBEZSBNYXJjaGkgPGx1Y2FzLmRlbWFyY2hpQHByb2Z1c2lv bi5tb2JpPgo+IC0tLQo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