From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Mon, 30 Sep 2019 09:26:08 +0200 Message-Id: <20190930072613.17956-9-u.oelmann@pengutronix.de> In-Reply-To: <20190930072613.17956-1-u.oelmann@pengutronix.de> References: <20190930072613.17956-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 Subject: [OSS-Tools] [PATCH dt-utils 08/13] state: keep backward compatibility List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: oss-tools-bounces@pengutronix.de Sender: "OSS-Tools" To: Pengutronix Public Open-Source-Development Cc: =?UTF-8?q?Ulrich=20=C3=96lmann?= SW50cm9kdWNlIHRoZSBuZXcgYnVpbGQgdGltZSBvcHRpb24gJy0tZW5hYmxlLXN0YXRlLWJhY2t3 YXJkLWNvbXBhdGliaWxpdHknIHRvCnBvcnQgdGhlIGZvbGxvd2luZyBiYXJlYm94IGNvbW1pdC4K Ck5PVEU6IFRoaXMgY2hhbmdlcyBiYXJlYm94LXN0YXRlJ3MgZGVmYXVsdCBiZWhhdmlvdXIuCgp8 IGNvbW1pdCA0ODBjZGUxYjIyODMxZmViYWNjMmE4YWI5MWRmZTk5ZDJlNWJlOGU5CnwgQXV0aG9y OiBKdWVyZ2VuIEJvcmxlaXMgPGpiZUBwZW5ndXRyb25peC5kZT4KfCBEYXRlOiAgIFR1ZSBBdWcg MTUgMTU6NDY6MzEgMjAxNyArMDIwMAp8CnwgICAgIHN0YXRlOiBrZWVwIGJhY2t3YXJkIGNvbXBh dGliaWxpdHkKfAp8ICAgICBQcmV2aW91cyAnc3RhdGUnIHZhcmlhYmxlIHNldCB2YXJpYW50cyBk byBub3Qga25vdyBhbmQgdXNlIG1ldGFkYXRhLiBUaGUKfCAgICAgJ2RpcmVjdCcgc3RvcmFnZSBi YWNrZW5kJ3MgcmVhZCB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ICAgICAgJFBBQ0tBR0UgJFZFUlNJT04KICAgICAgICAgPT09PT0K IAotICAgICAgICBwcmVmaXg6ICAgICAgICAgICAgICAgICAke3ByZWZpeH0KLSAgICAgICAgc3lz Y29uZmRpcjogICAgICAgICAgICAgJHtzeXNjb25mZGlyfQotICAgICAgICBsaWJkaXI6ICAgICAg ICAgICAgICAgICAke2xpYmRpcn0KLSAgICAgICAgaW5jbHVkZWRpcjogICAgICAgICAgICAgJHtp bmNsdWRlZGlyfQorICAgICAgICBwcmVmaXg6ICAgICAgICAgICAgICAgICAgICAgICAgICR7cHJl Zml4fQorICAgICAgICBzeXNjb25mZGlyOiAgICAgICAgICAgICAgICAgICAgICR7c3lzY29uZmRp cn0KKyAgICAgICAgbGliZGlyOiAgICAgICAgICAgICAgICAgICAgICAgICAke2xpYmRpcn0KKyAg ICAgICAgaW5jbHVkZWRpcjogICAgICAgICAgICAgICAgICAgICAke2luY2x1ZGVkaXJ9CiAKLSAg ICAgICAgY29tcGlsZXI6ICAgICAgICAgICAgICAgJHtDQ30KLSAgICAgICAgY2ZsYWdzOiAgICAg ICAgICAgICAgICAgJHtDRkxBR1N9Ci0gICAgICAgIGxkZmxhZ3M6ICAgICAgICAgICAgICAgICR7 TERGTEFHU30KKyAgICAgICAgY29tcGlsZXI6ICAgICAgICAgICAgICAgICAgICAgICAke0NDfQor ICAgICAgICBjZmxhZ3M6ICAgICAgICAgICAgICAgICAgICAgICAgICR7Q0ZMQUdTfQorICAgICAg ICBsZGZsYWdzOiAgICAgICAgICAgICAgICAgICAgICAgICR7TERGTEFHU30KIAotICAgICAgICBs b2dnaW5nOiAgICAgICAgICAgICAgICAke2VuYWJsZV9sb2dnaW5nfQotICAgICAgICBkZWJ1Zzog ICAgICAgICAgICAgICAgICAke2VuYWJsZV9kZWJ1Z30KKyAgICAgICAgbG9nZ2luZzogICAgICAg ICAgICAgICAgICAgICAgICAke2VuYWJsZV9sb2dnaW5nfQorICAgICAgICBkZWJ1ZzogICAgICAg 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