From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjite-0007W1-1O for barebox@lists.infradead.org; Fri, 03 Mar 2017 08:49:07 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 3 Mar 2017 09:48:41 +0100 Message-Id: <20170303084841.28907-1-u.kleine-koenig@pengutronix.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: [PATCH v2] tftp: implement forward seeking To: barebox@lists.infradead.org SnVzdCBhYnVzZSB0ZnRwX3JlYWQgdG8gc3RlcCBmb3J3YXJkLgoKU2lnbmVkLW9mZi1ieTogVXdl IEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCkhlbGxv LAoKdGhpcyBpcyB2MiB3aGljaCBjb21wYXJlZCB0byAoaW1wbGljaXQpIHYxIHVzZXMgeG1hbGxv YyBhbmQgbm8gZGVidWdnaW5nCmFueSBtb3JlLgoKV2hlbiB0ZnRwX2xzZWVrIGlzIGVudGVyZWQg d2l0aCBmLT5wb3MgPT0gcG9zLCB0aGUgb25seSB0aGluZyB0aGF0IHRoZQpmdW5jdGlvbiBkb2Vz IGlzIHhtYWxsb2MsIGZyZWUsIHJldHVybi4gSXMgaXQgd29ydGggdG8gb3B0aW1pemUgdGhhdD8K SSB0aG91Z2h0IGl0J3Mgbm90IHdvcnRoIHRoZSBhZGRpdGlvbmFsIChldmVuIGlmIHRyaXZpYWwp IGNvbXBsaWNhdGlvbiwKYnV0IHdhbnQgdG8gYXQgbGVhc3QgcG9pbnQgdGhhdCBvdXQuCg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