From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1aG4ah-0006Jk-VL for ptxdist@pengutronix.de; Mon, 04 Jan 2016 13:50:28 +0100 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S27009623AbcADMu1fWGV6 (ORCPT ); Mon, 4 Jan 2016 13:50:27 +0100 Date: Mon, 4 Jan 2016 13:49:49 +0100 From: Ladislav Michl Message-ID: <20160104124949.GA8261@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline Subject: [ptxdist] [PATCH] genimage: Add static UBI volumes support List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Artem Bityutskiy QmFyZSBpbWFnZXMgKGtlcm5lbCwgVS1Cb290LCBpdHMgZW52aXJvbm1lbnQpIG5lZWQgdG8gcmVz aWRlIGluc2lkZQpzdGF0aWMgVUJJIHZvbHVtZXMuIEFkZCByZWFkLW9ubHkgcGFydGl0aW9uIGZs YWcgYW5kIHVzZSBpdCBmb3IgdGhhdApwdXJwb3NlLiBBbHNvIG1ha2UgcGFydGl0aW9uJ3MgImlt YWdlIiB2b2x1bnRhcnkgYXMgdWJpbml6ZSB3aWxsIHllbGwKYW55d2F5LiBPbmNlIHRoaXMgYmVo YXZpb3IgZ2V0cyBtb2RpZmllZCBldmVudHVhbGx5LCBpdCB3aWxsIGJyaW5nIHVzCnBvc3NpYmls aXR5IHRvIGNyZWF0ZSBlbXB0eSB2b2x1bWVzIHJlYWR5IGZvciBydW50aW1lIHVwZGF0ZS4KClNp Z25lZC1vZmYtYnk6IExhZGlz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