From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yx0-f177.google.com ([209.85.213.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ROUT5-0003WN-RV for barebox@lists.infradead.org; Thu, 10 Nov 2011 13:15:00 +0000 Received: by yenl9 with SMTP id l9so2251906yen.36 for ; Thu, 10 Nov 2011 05:14:58 -0800 (PST) From: Lucas De Marchi Date: Thu, 10 Nov 2011 11:15:55 -0200 Message-Id: <1320930955-5462-1-git-send-email-lucas.demarchi@profusion.mobi> In-Reply-To: <4EBBAD3A.5060805@pengutronix.de> References: <4EBBAD3A.5060805@pengutronix.de> MIME-Version: 1.0 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: [PATCH 1/4] Make fprintf return number of bytes written To: barebox@lists.infradead.org UmV0dXJuIG51bWJlciBvZiBieXRlcyB3cml0dGVuLCBsaWtlIGl0cyBzaWJsaW5ncyBmdW5jdGlv bi4gVGhpcyBhbHNvCnJlbW92ZXMgdGhlIHdhcm5pbmcgYmVsb3cgb24gZ2NjID49IDQuNi4KCmNv bW1vbi9jb25zb2xlLmM6MzMzOjc6IHdhcm5pbmc6IHZhcmlhYmxlIOKAmGnigJkgc2V0IGJ1dCBu b3QgdXNlZApbLVd1bnVzZWQtYnV0LXNldC12YXJpYWJsZV0KClNpZ25lZC1vZmYtYnk6IEx1Y2Fz IERlIE1hcmNoaSA8bHVjYXMuZGVtYXJjaGlAcHJvZnVzaW9uLm1vYmk+Ci0tLQoKdjI6IHVzZSBw cm9wZXIgaW5kZW50YXRpb24KCiBjb21tb24vY29uc29sZS5jICAgICAgICB8ICAgIDQgKysrLQog Y29tbW9uL2NvbnNvbGVfc2ltcGxlLmMgfCAgICA0ICsrKy0KIGluY2x1ZGUv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