From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aJ2FN-0002A1-G9 for ptxdist@pengutronix.de; Tue, 12 Jan 2016 17:56:41 +0100 Received: from mol by dude.hi.pengutronix.de with local (Exim 4.86) (envelope-from ) id 1aJ2FN-0005Qm-8b for ptxdist@pengutronix.de; Tue, 12 Jan 2016 17:56:41 +0100 Date: Tue, 12 Jan 2016 17:56:41 +0100 From: Michael Olbrich Message-ID: <20160112165641.GJ18044@pengutronix.de> References: <20160104124949.GA8261@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160104124949.GA8261@localhost.localdomain> Subject: Re: [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 T24gTW9uLCBKYW4gMDQsIDIwMTYgYXQgMDE6NDk6NDlQTSArMDEwMCwgTGFkaXNsYXYgTWljaGwg d3JvdGU6Cj4gQmFyZSBpbWFnZXMgKGtlcm5lbCwgVS1Cb290LCBpdHMgZW52aXJvbm1lbnQpIG5l ZWQgdG8gcmVzaWRlIGluc2lkZQo+IHN0YXRpYyBVQkkgdm9sdW1lcy4gQWRkIHJlYWQtb25seSBw YXJ0aXRpb24gZmxhZyBhbmQgdXNlIGl0IGZvciB0aGF0Cj4gcHVycG9zZS4gQWxzbyBtYWtlIHBh cnRpdGlvbidzICJpbWFnZSIgdm9sdW50YXJ5IGFzIHViaW5pemUgd2lsbCB5ZWxsCj4gYW55d2F5 LiBPbmNlIHRoaXMgYmVoYXZpb3IgZ2V0cyBtb2RpZm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19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXwo+IHB0eGRpc3QgbWFpbGluZyBsaXN0Cj4gcHR4ZGlzdEBwZW5ndXRyb25p eC5kZQoKLS0gClBlbmd1dHJvbml4IGUuSy4gICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB8CkluZHVzdHJpYWwgTGludXggU29sdXRpb25zICAg ICAgICAgICAgICAgICB8IGh0dHA6Ly93d3cucGVuZ3V0cm9uaXguZGUvICB8ClBlaW5lciBTdHIu IDYtOCwgMzExMzcgSGlsZGVzaGVpbSwgR2VybWFueSB8IFBob25lOiArNDktNTEyMS0yMDY5MTct MCAgICB8CkFtdHNnZXJpY2h0IEhpbGRlc2hlaW0sIEhSQSAyNjg2ICAgICAgICAgICB8IEZheDog ICArNDktNTEyMS0yMDY5MTctNTU1NSB8CgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXwpwdHhkaXN0IG1haWxpbmcgbGlzdApwdHhkaXN0QHBlbmd1dHJvbml4 LmRl