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 1ccdoO-00074F-9m for barebox@lists.infradead.org; Sat, 11 Feb 2017 19:58:32 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Sat, 11 Feb 2017 20:57:52 +0100 Message-Id: <20170211195752.13616-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170211195752.13616-1-u.kleine-koenig@pengutronix.de> References: <20170211195752.13616-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 2/2] scripts/kwboot: new parameter -n to skip a number of NAKs To: barebox@lists.infradead.org Cc: bodhi T24gc29tZSBtYWNoaW5lcyB0aGUgQ1BVIHJlc2V0cyB0d2ljZSBhbmQgc28ga3dib290IG11c3Qg aGl0IHRoZSBzZWNvbmQKd2luZG93IHRvIGVudGVyIGRlYnVnIG9yIGJvb3QgbW9kZS4gRm9yIHRo aXMgc2NlbmFyaW8gaXQgaGVscHMgdG8gaWdub3JlCmEgbnVtYmVyIG9mIE5BS3MuIElmIHlvdSBj aG9vc2UgYSBudW1iZXIgdG9vIGhpZ2ggZm9yIGJvb3RpbmcsIHRoZSBwcm9jZXNzCmlzIG9ubHkg c2xvd2VkIGRvd24gYmVjYXVzZSB3aGVuIHRoZSBDUFUgZW50ZXJzIFVBUlQgYm9vdCBtb2RlIGl0 IHNlbmRzIE5BS3MKd2hlbiBub3QgZ2V0dGluZyBhbnkgaW5wdXQuCgpUaGlzIG5ldyBvcHRpb24g YWxzbyBoZWxwcyB3aGVuIHRoZXJlIGFyZSB2b2x0YWdlIGZs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