From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.emlix.com ([188.40.240.192]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jldnn-00009g-R0 for barebox@lists.infradead.org; Wed, 17 Jun 2020 19:32:53 +0000 References: <20200617081126.5683-1-s.hauer@pengutronix.de> <20200617081126.5683-16-s.hauer@pengutronix.de> From: =?UTF-8?Q?Daniel_Gl=c3=b6ckner?= Message-ID: <946b4a56-1c05-6dbd-32d1-c100d6681065@emlix.com> Date: Wed, 17 Jun 2020 21:32:45 +0200 MIME-Version: 1.0 In-Reply-To: <20200617081126.5683-16-s.hauer@pengutronix.de> Content-Language: de-DE 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 15/19] fastboot net: implement fastboot over UDP To: Sascha Hauer , Barebox List Cc: Edmund Henniges SGVsbG8gU2FzY2hhLAoKQW0gMTcuMDYuMjAgdW0gMTA6MTEgc2NocmllYiBTYXNjaGEgSGF1ZXI6 Cgo+ICsJcmV0ID0gZmFzdGJvb3RfbmV0X3dhaXRfbWF5X3NlbmQoZmJuKTsKPiArCWlmIChyZXQp Cj4gKwkJcmV0dXJuIHJldDsKCldoZXJlIGlzIHRoZSBwYXJ0IHRoYXQgYWJvcnRzIHRoZSBzZXNz aW9uIG9uIHRpbWVvdXQ/Cgo+ICtzdGF0aWMgdm9pZCBmYXN0Ym9vdF9zdGFydF9kb3dubG9hZF9u ZXQoc3RydWN0IGZhc3Rib290ICpmYikKPiArewo+ICsJc3RydWN0IGZhc3Rib290X25ldCAqZmJu ID0gY29udGFpbmVyX29mKGZiLCBzdHJ1Y3QgZmFzdGJvb3RfbmV0LAo+ICsJCQkJCQlmYXN0Ym9v dCk7Cj4gKwo+ICsJZmFzdGJvb3Rfc3Rh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