From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 4.mo1.mail-out.ovh.net ([46.105.76.26] helo=mo1.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5xQz-0006Mg-CV for barebox@lists.infradead.org; Thu, 14 Feb 2013 11:57:02 +0000 Received: from mail610.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo1.mail-out.ovh.net (Postfix) with SMTP id 9A1D3FFA225 for ; Thu, 14 Feb 2013 13:12:24 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Thu, 14 Feb 2013 12:56:49 +0100 Message-Id: <1360843011-7807-1-git-send-email-eric@eukrea.com> In-Reply-To: <20130214121716.1f3ef4f7@e6520eb> References: <20130214121716.1f3ef4f7@e6520eb> 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/3] env: add register_persistent_environment To: barebox@lists.infradead.org Cc: Juergen Beisert LSBoZWF2aWx5IGNvcGllZCBmcm9tIHJlZ2lzdGVyX3BlcnNpc3RhbnRfZW52aXJvbm1lbnQgd2hp Y2ggd2FzClNpZ25lZC1vZmYtYnk6IEp1ZXJnZW4gQmVpc2VydCA8amJlQHBlbmd1dHJvbml4LmRl PgoKU2lnbmVkLW9mZi1ieTogRXJpYyBCw6luYXJkIDxlcmljQGV1a3JlYS5jb20+Ci0tLQogY29t bW9uL2Vudmlyb25tZW50LmMgIHwgNDAgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKwogaW5jbHVkZS9lbnZpcm9ubWVudC5oIHwgIDEgKwogMiBmaWxlcyBjaGFuZ2VkLCA0 MSBpbnNlcnRpb25zKCspCgpkaWZmIC0tZ2l0IGEvY29tbW9uL2V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