From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Tue, 7 May 2019 22:33:48 +0200 From: Ladislav Michl Message-ID: <20190507203348.GA5030@lenoch> References: <20190506174409.GA23081@lenoch> <20190507073128.GA649@lenoch> <20190507154902.GA30791@lenoch> <1557251975.31309.83.camel@impinj.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1557251975.31309.83.camel@impinj.com> Subject: Re: [RAUC] Failed to mount seed slot List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: Trent Piepho Cc: "ejo@pengutronix.de" , "rauc@pengutronix.de" , "jlu@pengutronix.de" T24gVHVlLCBNYXkgMDcsIDIwMTkgYXQgMDU6NTk6MzZQTSArMDAwMCwgVHJlbnQgUGllcGhvIHdy b3RlOgo+IE9uIFR1ZSwgMjAxOS0wNS0wNyBhdCAxNzo0OSArMDIwMCwgTGFkaXNsYXYgTWljaGwg d3JvdGU6Cj4gPiBPbiBUdWUsIE1heSAwNywgMjAxOSBhdCAwOTozMToyOEFNICswMjAwLCBMYWRp c2xhdiBNaWNobCB3cm90ZToKPiA+ID4gT24gTW9uLCBNYXkgMDYsIDIwMTkgYXQgMDc6NDQ6MDlQ TSArMDIwMCwgTGFkaXNsYXYgTWljaGwgd3JvdGU6Cj4gPiA+ID4gW3Nsb3Qucm9vdGZzLjBdCj4g PiA+ID4gZGV2aWNlPS9kZXYvdWJpMF8wCj4gPiA+ID4gdHlwZT11Ymlmcwo+ID4gPiA+IGJvb3Ru YW1lPXN5c3RlbTAKPiA+ID4gPiAKPiA+ID4gPiBOb3cgc3lzdGVtIGlzIGJvb3RlZCB3aXRoIHJv b3RmcyBtb3VudGVkIHJlYWQgb25seSB3aGljaCBtYWtlcyBtb3VudGluZyBzZWVkCj4gPiA+ID4g c2xvdCBmYWlsOgo+ID4gPiA+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