From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from zimbra1.kalray.eu ([92.103.151.219]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk36O-0000yL-NV for barebox@lists.infradead.org; Tue, 22 Aug 2017 06:55:58 +0000 Date: Tue, 22 Aug 2017 08:55:29 +0200 (CEST) From: =?utf-8?Q?Cl=C3=A9ment?= Leger Message-ID: <54973461.287168066.1503384929613.JavaMail.zimbra@kalray.eu> In-Reply-To: <92639b98-1bc6-61fd-dec9-28db41c06a13@rempel-privat.de> References: <908276710.287135237.1503332620287.JavaMail.zimbra@kalray.eu> <92639b98-1bc6-61fd-dec9-28db41c06a13@rempel-privat.de> 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/1] TFTP: Add support for custom server and port To: Oleksij Rempel Cc: barebox@lists.infradead.org SGkgT2xla3NpaiwKCkluZGVlZCwgZXRoeC5zZXJ2ZXJpcCB3YXMgd29ya2luZyBmb3IgbWUsIGhv d2V2ZXIgYXMgSSBuZWVkZWQgdG8gYWRkCnRoZSBwb3J0IG9wdGlvbiwgaXQgZmVsdCBtb3JlIG5h dHVyYWwgdG8gb25seSBoYXZlIG9uZSBjb21tYW5kIHRvCmV4ZWN1dGUgdGhlIHRmdHAgdHJhbnNm ZXIgd2l0aCBib3RoIHNlcnZlciBhbmQgcG9ydC4KSWYgdW5uZWVkZWQsIEkgY2FuIHJlbW92ZSBp dCBvZiBjb3Vyc2UuCgpSZWdhcmRzLAoKQ2zDqW1lbnQKCi0tLS0tIE1haWwgb3JpZ2luYWwgLS0t LS0KPiBEZTogIk9sZWtzaWogUmVtcGVsIiA8bGludXhAcmVtcGVsLXByaXZhdC5kZT4KPiDDgDog IkNsw6ltZW50IExlZ2V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