From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yw0-f49.google.com ([209.85.213.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ROFrb-00036F-LA for barebox@lists.infradead.org; Wed, 09 Nov 2011 21:39:20 +0000 Received: by ywp31 with SMTP id 31so169618ywp.36 for ; Wed, 09 Nov 2011 13:39:18 -0800 (PST) From: Lucas De Marchi Date: Wed, 9 Nov 2011 19:39:54 -0200 Message-Id: <1320874797-14270-2-git-send-email-lucas.demarchi@profusion.mobi> In-Reply-To: <1320874797-14270-1-git-send-email-lucas.demarchi@profusion.mobi> References: <1320874797-14270-1-git-send-email-lucas.demarchi@profusion.mobi> 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+Ci0tLQogY29tbW9uL2Nv bnNvbGUuYyAgICAgICAgfCAgICA0ICsrKy0KIGNvbW1vbi9jb25zb2xlX3NpbXBsZS5jIHwgICAg NCArKystCiBpbmNsdWRlL3N0ZGlvLmggICA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