From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Alexander Dahl Date: Wed, 30 Aug 2017 16:49:42 +0200 Message-Id: <1504104582-32171-3-git-send-email-ada@thorsis.com> In-Reply-To: <1504104582-32171-1-git-send-email-ada@thorsis.com> References: <1504104582-32171-1-git-send-email-ada@thorsis.com> Subject: [ptxdist] [PATCH 2/2] mtd-utils: Add patch for new tool 'nandmarkbad' List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= dGFrZW4gZnJvbSBodHRwczovL3BhdGNod29yay5vemxhYnMub3JnL3BhdGNoLzgwNzU5Ni8KClN1 Z2dlc3RlZC1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25p eC5kZT4KU2lnbmVkLW9mZi1ieTogQWxleGFuZGVyIERhaGwgPGFkYUB0aG9yc2lzLmNvbT4KLS0t CiAuLi5hbmRtYXJrYmFkLW5ldy11dGlsLXRvLW1hcmstYmxvY2tzLWFzLWJhZC5wYXRjaCB8IDE1 OCArKysrKysrKysrKysrKysrKysrKysKIHBhdGNoZXMvbXRkLXV0aWxzLTIuMC4xL2F1dG9nZW4u c2ggICAgICAgICAgICAgICAgIHwgICAxICsKIHBhdGNoZXMvbXRkLXV0aWxzLTIuMC4xL3Nlcmll cyAgICAgICAgICAgICAgICAgICAgIHwgICA0ICsKIHJ1bGVzL210ZC11dGlscy5pbiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA2ICsKIHJ1bGVzL210ZC11dGlscy5tYWtlICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICsKIDUgZmlsZX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kJCWJyZWFrOwor KworKwkJY2FzZSAnYic6CisrCQkJaWYgKGNudF9iYWQgPCBBUlJBWV9TSVpFKG1hcmtfYmFkKSkg eworKwkJCQltYXJrX2JhZFtjbnRfYmFkXSA9CisrCQkJCQlzaW1wbGVfc3RydG9sbChvcHRhcmcs ICZlcnJvcik7CisrCQkJCSsrY250X2JhZDsKKysJCQl9IGVsc2UgeworKwkJCQllcnJtc2dfZGll KCJDYW4ndCBoYW5kbGUgc28gbWFueSBiYWQgYmxvY2tzXG4iKTsKKysJCQl9CisrCisrCQkJYnJl YWs7CisrCisrCQljYXNlICdoJzoKKysJCQl1c2FnZShFWElUX1NVQ0NFU1MpOworKwkJCWJyZWFr OworKworKwkJY2FzZSAnVic6CisrCQkJY29tbW9uX3ByaW50X3ZlcnNpb24oKTsKKysJCQlyZXR1 cm4gRVhJVF9TVUNDRVNTOworKworKwkJY2FzZSAneSc6CisrCQkJaWtub3d3aGF0aWRvID0gMTsK KysJCQlicmVhazsKKysJCX0KKysJfQorKworKwlhcmdjIC09IG9wdGluZDsKKysJYXJndiArPSBv cHRpbmQ7CisrCisrCWlmIChlcnJvcikKKysJCXVzYWdlKEVYSVRfRkFJTFVSRSk7CisrCisrCWlm IChhcmdjICE9IDEpCisrCQllcnJtc2dfZGllKCJZb3UgbXVzdCBzcGVjaWZ5IGEgZGV2aWNlIHRv IG9wZXJhdGUgb25cbiIpOworKworKwlpZiAoIWNudF9iYWQpCisrCQllcnJtc2dfZGllKCJZb3Ug bXVzdCBzcGVjaWZ5IGF0IGxlYXN0IG9uZSBibG9jayB0byBtYXJrIGJhZFxuIik7CisrCisrCWlm ICghaWtub3d3aGF0aWRvKQorKwkJZXJybXNnX2RpZShQUk9HUkFNX05BTUUgIiBkb2VzIHRoaW5n cyB0aGF0IGFyZSBoYXJkIHRvIHVuZG8uXG4iCisrCQkJICAgIlx0UGxlYXNlIGNvbnZpbmNlIHlv dXJzZWxmIHlvdSB1bmRlcnN0YW5kIHRoZSByaXNrc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