From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from inx.pm.waw.pl ([195.116.170.130]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SQmq9-0005pa-Bt for barebox@lists.infradead.org; Sat, 05 May 2012 21:48:34 +0000 From: Krzysztof Halasa Date: Sat, 05 May 2012 23:45:07 +0200 Message-ID: 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: RFC: memmap() now returns NULL on failure. To: barebox@lists.infradead.org T3JpZ2luYWxseSwgbW9zdCBjYWxsZXJzIGV4cGVjdGVkIC0xIHdoaWxlIHNvbWUgdGhvdWdodCB0 aGV5J2QgZ2V0IE5VTEwKb24gZmFpbHVyZS4gTlVMTCBzZWVtcyBjbGVhbmVyIHRvIG1lLgoKT2Yg Y291cnNlIGlzIHdlIHdhbnQgdG8gYWxsb3cgbWVtbWFwcGluZyBvZiAiL2Rldi9yYW0iIG9yIHNv bWV0aGluZwphbGlrZSB0aGVuIHdlIGNhbid0IGFwcGx5IHRoaXMgcGF0Y2gsIHdlIG5lZWQgdG8g Zml4IHRoZSBOVUxMLWV4cGVjdGVycwppbnN0ZWFkLiBBbHRlcm5hdGl2ZWx5IHdlIGNvdWxkIHBh c3MgJm1lbSBhcyBhbiBhcmd1bWVudCAodGhhdCdzIHdoYXQKaW5kaXZpZHVhbCBmcyBtZW1tYXAg aW1wbGVtZW50YXRpb25zIGRvKS4KClNpZ25lZC1vZmYtYnk6IEtyenlzenRvZiBIYcWCYXNhIDxr aGNAcG0ud2F3LnBsPgoKZGlmZiAtLWdpdCBhL2FyY2gvYXJtL2xpYi9ib290dS5jIGIvYXJjaC9h cm0vbGliL2Jvb3R1LmMKaW5kZXggMGQxNTVjYi4uNDc4NTI1ZSAxM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