From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E3B8281F28 for ; Mon, 27 Feb 2017 21:24:01 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2017 21:24:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,217,1484035200"; d="scan'208";a="1135833971" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 27 Feb 2017 21:24:01 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 27 Feb 2017 21:24:01 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 27 Feb 2017 21:24:00 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Tue, 28 Feb 2017 13:23:58 +0800 From: "Fu, Siyuan" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Yao, Jiewen" Thread-Topic: [PATCH v2 04/11] MdePkg/BaseLib: Add StrToGuid/StrHexToBytes/StrToIpv[4/6]Address Thread-Index: AQHSkMpQsFVunbVde0qH2K8ZcdBKOKF95Axg Date: Tue, 28 Feb 2017 05:23:57 +0000 Message-ID: References: <20170227072239.273228-1-ruiyu.ni@intel.com> <20170227072239.273228-5-ruiyu.ni@intel.com> In-Reply-To: <20170227072239.273228-5-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTBhODVlMmQtMjU0Ni00MTcwLWExYzctMTIxNzIzZGU3ODBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkNDNkQxRXpXVFZORng3OW9wcXhTZTZuazBmdXIzR1JVQlhneVJ4eUU2eVk9In0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 04/11] MdePkg/BaseLib: Add StrToGuid/StrHexToBytes/StrToIpv[4/6]Address X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 05:24:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 UGF0Y2ggNCwgNSwgMTEgUmV2aWV3ZWQtYnk6IEZ1IFNpeXVhbiA8c2l5dWFuLmZ1QGludGVsLmNv bT4NCg0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogTmksIFJ1aXl1IA0KU2Vu dDogMjAxN8TqMtTCMjfI1SAxNToyMw0KVG86IGVkazItZGV2ZWxAbGlzdHMuMDEub3JnDQpDYzog R2FvLCBMaW1pbmcgPGxpbWluZy5nYW9AaW50ZWwuY29tPjsgWWFvLCBKaWV3ZW4gPGppZXdlbi55 YW9AaW50ZWwuY29tPjsgRnUsIF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gICAgICAgICAgICAgICAgICAgICAgSWYgRGF0YSBpcyBOVUxMLg0KKyAgQHJldHZh bCBSRVRVUk5fVU5TVVBQT1JURUQgICAgICAgSWYgWCBjb250YWlucyBtb3JlIHRoYW4gZm91ciBo ZXhhZGVjaW1hbA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpZ2l0IGNo YXJhY3RlcnMuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBTdHJpbmcg Y29udGFpbnMgIjo6IiBhbmQgbnVtYmVyIG9mIFgNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBpcyBub3QgbGVzcyB0aGFuIDguDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBJZiBQIHN0YXJ0cyB3aXRoIGNoYXJhY3RlciB0aGF0IGlzIG5vdCBhDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWQgZGVjaW1hbCBkaWdpdCBjaGFy YWN0ZXIuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiB0aGUgZGVjaW1h bCBudW1iZXIgY29udmVydGVkIGZyb20gUA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGV4Y2VlZHMgMTI4Lg0KKw0KKyoqLw0KK1JFVFVSTl9TVEFUVVMNCitFRklBUEkNCitT dHJUb0lwdjZBZGRyZXNzICgNCisgIElOICBDT05TVCBDSEFSMTYgICAgICAgKlN0cmluZywNCisg IE9VVCBDSEFSMTYgICAgICAgICAgICAgKipFbmRQb2ludGVyLCBPUFRJT05BTA0KKyAgT1VUIElQ djZfQUREUkVTUyAgICAgICAqQWRkcmVzcywNCisgIE9VVCBVSU5UOCAgICAgICAgICAgICAgKlBy ZWZpeExlbmd0aCBPUFRJT05BTA0KKyAgKTsNCisNCisvKioNCisgIENvbnZlcnQgYSBOdWxsLXRl cm1pbmF0ZWQgVW5pY29kZSBzdHJpbmcg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CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxlbmd0aC4gTUFYX1VJTlQ4IGlzIHJldHVybmVkIHdoZW4gL1AgaXMNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdCBpbiB0aGUgU3RyaW5nLg0KKw0K KyAgQHJldHZhbCBSRVRVUk5fU1VDQ0VTUyAgICAgICAgICAgQWRkcmVzcyBpcyB0cmFuc2xhdGVk IGZyb20gU3RyaW5nLg0KKyAgQHJldHZhbCBSRVRVUk5fSU5WQUxJRF9QQVJBTUVURVIgSWYgU3Ry aW5nIGlzIE5VTEwuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBEYXRh IGlzIE5VTEwuDQorICBAcmV0dmFsIFJFVFVSTl9VTlNVUFBPUlRFRCAgICAgICBJZiBTdHJpbmcg aXMgbm90IGluIHRoZSBjb3JyZWN0IGZvcm1hdC4NCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIElmIGFueSBkZWNpbWFsIG51bWJlciBjb252ZXJ0ZWQgZnJvbSBEDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhjZWVkcyAyNTUuDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBJZiB0aGUgZGVjaW1hbCBudW1iZXIgY29udmVydGVkIGZy b20gUA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4Y2VlZHMgMzIuDQor DQorKiovDQorUkVUVVJOX1NUQVRVUw0KK0VGSUFQSQ0KK1N0clRvSXB2NEFkZHJlc3MgKA0KKyAg SU4gIENPTlNUIENIQVIxNiAgICAgICAqU3RyaW5nLA0KKyAgT1VUIENIQVIxNiAgICAgICAgICAg ICAqKkVuZFBvaW50ZXIsIE9QVElPTkFMDQorICBPVVQgSVB2NF9BRERSRVNTICAgICAgICpBZGRy ZXNzLA0KKyAgT1VUIFVJTlQ4ICAgICAgICAgICAgICAqUHJlZ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gICAgICAgICAgZWUgICAgICAgICAgRGF0YTJbODoxNV0NCisgICAgICAg ICAgICAgICAgICBmZiAgICAgICAgICBEYXRhMlswOjddDQorICAgICAgICAgICAgICAgICAgZ2cg ICAgICAgICAgRGF0YTNbODoxNV0NCisgICAgICAgICAgICAgICAgICBoaCAgICAgICAgICBEYXRh M1swOjddDQorICAgICAgICAgICAgICAgICAgaWkgICAgICAgICAgRGF0YTRbMDo3XQ0KKyAgICAg ICAgICAgICAgICAgIGpqICAgICAgICAgIERhdGE0Wzg6MTVdDQorICAgICAgICAgICAgICAgICAg a2sgICAgICAgICAgRGF0YTRbMTY6MjNdDQorICAgICAgICAgICAgICAgICAgbGwgICAgICAgICAg RGF0YTRbMjQ6MzFdDQorICAgICAgICAgICAgICAgICAgbW0gICAgICAgICAgRGF0YTRbMzI6Mzld DQorICAgICAgICAgICAgICAgICAgbm4gICAgICAgICAgRGF0YTRbNDA6NDddDQorICAgICAgICAg ICAgICAgICAgb28gICAgICAgICAgRGF0YTRbNDg6NTVdDQorICAgICAgICAgICAgICAgICAgcHAg ICAgICAgICAgRGF0YTRbNTY6NjNdDQorDQorICBJZiBTdHJpbmcgaXMgTlVMTCwgdGhlbiBBU1NF UlQoKS4NCisgIElmIEd1aWQgaXMgTlVMTCwgdGhlbiBBU1NFUlQoKS4NCisgIElmIFN0cmluZyBp cyBub3QgYWxpZ25lZCBpbiBhIDE2LWJpdCBib3VuZGFyeSwgdGhlbiBBU1NFUlQoKS4NCisNCisg IEBwYXJhbSAgU3RyaW5nICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gYSBOdWxsLXRlcm1p bmF0ZWQgVW5pY29kZSBzdHJpbmcuDQorICBAcGFyYW0gIEd1aWQgICAgICAgICAgICAgICAgICAg ICBQb2ludGVyIHRvIHRoZSBjb252ZXJ0ZWQgR1VJRC4NCisNCisgIEByZXR2YWwgUkVUVVJOX1NV Q0NFU1MgICAgICAgICAgIEd1aWQgaXMgdHJhbnNsYXRlZCBm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DQ0VTUyAgICAgICAgICAgQnVmZmVyIGlzIHRyYW5zbGF0ZWQgZnJvbSBTdHJpbmcuDQor ICBAcmV0dmFsIFJFVFVSTl9JTlZBTElEX1BBUkFNRVRFUiBJZiBTdHJpbmcgaXMgTlVMTC4NCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIERhdGEgaXMgTlVMTC4NCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIExlbmd0aCBpcyBub3QgbXVsdGlwbGUg b2YgMi4NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIFBjZE1heGltdW1V bmljb2RlU3RyaW5nTGVuZ3RoIGlzIG5vdCB6ZXJvLA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGFuZCBMZW5ndGggaXMgZ3JlYXRlciB0aGFuDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgUGNkTWF4aW11bVVuaWNvZGVTdHJpbmdMZW5ndGguDQorICBA cmV0dmFsIFJFVFVSTl9VTlNVUFBPUlRFRCAgICAgICBJZiBMZW5ndGggb2YgY2hhcmFjdGVycyBm cm9tIFN0cmluZyBjb250YWluDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YSBjaGFyYWN0ZXIgdGhhdCBpcyBub3QgdmFsaWQgaGV4YWRlY2ltYWwNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkaWdpdCBjaGFyYWN0ZXJzLCBvciBhIE51bGwtdGVybWlu YXRvci4NCisgIEByZXR2YWwgUkVUVVJOX0JVRkZFUl9UT09fU01BTEwgIElmIE1heEJ1ZmZlclNp emUgaXMgbGVzcyB0aGFuIChMZW5ndGggLyAyKS4NCisqKi8NCitSRVRVUk5fU1RBVFVTDQorRUZJ QVBJDQorU3RySGV4VG9CeXRlcyAoDQorICBJTiAgQ09OU1QgQ0hBUjE2ICAgICAgICpTdHJpbmcs DQorICBJTiAgVUl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9pbnRlciB0byB0aGUgY29udmVydGVkIElQdjYg YWRkcmVzcyBwcmVmaXgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0 aC4gTUFYX1VJTlQ4IGlzIHJldHVybmVkIHdoZW4gL1AgaXMNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG5vdCBpbiB0aGUgU3RyaW5nLg0KKw0KKyAgQHJldHZhbCBSRVRVUk5f U1VDQ0VTUyAgICAgICAgICAgQWRkcmVzcyBpcyB0cmFuc2xhdGVkIGZyb20gU3RyaW5nLg0KKyAg QHJldHZhbCBSRVRVUk5fSU5WQUxJRF9QQVJBTUVURVIgSWYgU3RyaW5nIGlzIE5VTEwuDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBEYXRhIGlzIE5VTEwuDQorICBAcmV0 dmFsIFJFVFVSTl9VTlNVUFBPUlRFRCAgICAgICBJZiBYIGNvbnRhaW5zIG1vcmUgdGhhbiBmb3Vy IGhleGFkZWNpbWFsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlnaXQg Y2hhcmFjdGVycy4NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIFN0cmlu ZyBjb250YWlucyAiOjoiIGFuZCBudW1iZXIgb2YgWA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGlzIG5vdCBsZXNzIHRoYW4gOC4NCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIElmIFAgc3RhcnRzIHdpdGggY2hhcmFjdGVyIHRoYXQgaXMgbm90IGENCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWxpZCBkZWNpbWFsIGRpZ2l0IGNo YXJhY3Rlci4NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIHRoZSBkZWNp bWFsIG51bWJlciBjb252ZXJ0ZWQgZnJvbSBQDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZXhjZWVkcyAxMjguDQorDQorKiovDQorUkVUVVJOX1NUQVRVUw0KK0VGSUFQSQ0K K1N0clRvSXB2NkFkZHJlc3MgKA0KKyAgSU4gIENPTlNUIENIQVIxNiAgICAgICAqU3RyaW5nLA0K KyAgT1VUIENIQVIxNiAgICAgICAgICAgICAqKkVuZFBvaW50ZXIsIE9QVElPTkFMDQorICBPVVQg SVB2Nl9BRERSRVNTICAgICAgICpBZGRyZXNzLA0KKyAgT1VUIFVJTlQ4ICAgICAgICAgICAgICAq UHJlZml4TGVuZ3RoIE9QVElPTkFMDQorICApDQorew0KKyAgUkVUVVJOX1NUQVRVUyAgICAgICAg ICBTdGF0dXM7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgIEFkZHJlc3NJbmRleDsNCisgIFVJ TlROICAgICAgICAgICAgICAgICAgVWludG47DQorICBJUHY2X0FERFJFU1MgICAgICAgICAgIExv Y2FsQWRkcmVzczsNCisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgTG9jYWxQcmVmaXhMZW5ndGg7 DQorICBDT05TVCBDSEFSMTYgICAgICAgICAgICpQb2ludGVyOw0KKyAgQ0hBUjE2ICAgICAgICAg ICAgICAgICAqRW5kOw0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICBDb21wcmVzc1N0YXJ0Ow0K KyAgQk9PTEVBTiAgICAgICAgICAgICAgICBFeHBlY3RQcmVmaXg7DQorDQorICBMb2NhbFByZWZp eExlbmd0aCA9IE1BWF9VSU5UODsNCisgIENvbXByZXNzU3RhcnQgICAgID0gQVJSQVlfU0laRSAo QWRkcmVzcy0+QWRkcik7DQorICBFeHBlY3RQcmVmaXggICAgICA9IEZBTFNFOw0KKw0KKyAgQVNT RVJUICgoKFVJTlROKSBTdHJpbmcgJiBCSVQwKSA9PSAwKTsNCisNCisgIC8vDQorICAvLyAxLiBO b25lIG9mIFN0cmluZyBvciBHdWlkIHNoYWxsIGJlIGEgbnVsbCBwb2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BZGRyZXNzLT5BZGRyKSB8fCBBZGRyZXNzSW5kZXggPT0gQVJSQVlfU0laRSAo QWRkcmVzcy0+QWRkcikpIHsNCisgICAgICAgIC8vDQorICAgICAgICAvLyAiOjoiIGNhbiBvbmx5 IGFwcGVhciBvbmNlLg0KKyAgICAgICAgLy8gIjo6IiBjYW4gb25seSBhcHBlYXIgd2hlbiBhZGRy ZXNzIGlzIG5vdCBmdWxsIGxlbmd0aC4NCisgICAgICAgIC8vDQorICAgICAgICByZXR1cm4gUkVU VVJOX1VOU1VQUE9SVEVEOw0KKyAgICAgIH0gZWxzZSB7DQorICAgICAgICAvLw0KKyAgICAgICAg Ly8gUmVtZW1iZXIgdGhlIHN0YXJ0IG9mIHplcm8gY29tcHJlc3NpbmcuDQorICAgICAgICAvLw0K KyAgICAgICAgQ29tcHJlc3NTdGFydCA9IEFkZHJlc3NJbmRleDsNCisgICAgICAgIFBvaW50ZXIr KzsNCisNCisgICAgICAgIGlmIChDb21wcmVzc1N0YXJ0ID09IDApIHsNCisgICAgICAgICAgaWYg KCpQb2ludGVyICE9IEwnOicpIHsNCisgICAgICAgICAgICAvLw0KKyAgICAgICAgICAgIC8vIFNp bmdsZSAiOiIgc2hhbGwgbm90IGJlIGluIHRoZSBiZWdpbm5pbmcgb2YgU3RyaW5nLg0KKyAgICAg ICAgICAgIC8vDQorICAgICAgICAgICAgcmV0dXJuIFJFVFVSTl9VTlNVUFBPUlRFRDsNCisgICAg ICAgICAgfQ0KKyAgICAgICAgICBQb2ludGVyKys7DQorICAgICAgICB9DQorICAgICAgfQ0KKyAg ICB9DQorDQorICAgIGlmICghSW50ZXJuYWxJc0hleGFEZWNpbWFsRGlnaXRDaGFyYWN0ZXIgKCpQ b2ludGVyKSkgew0KKyAgICAgIGlmICgqUG9pbnRlciA9PSBMJy8nKSB7DQorICAgICAgICAvLw0K KyAgICAgICAgLy8gTWlnaHQgYmUgb3B0aW9uYWwgIi9QIiBhZnRlciAiOjoiLg0KKyAgICAgICAg Ly8NCisgICAgICAgIGlmIChDb21wcmVzc1N0YXJ0ICE9IEFkZHJlc3NJbmRleCkgew0KKyAgICAg ICAgICByZXR1cm4gUkVUVVJOX1VOU1VQUE9SVEVEOw0KKyAgICAgICAgfQ0KKyAgICAgIH0gZWxz ZSB7DQorICAgICAgICBicmVhazsNCisgICAgICB9DQorICAgIH0gZWxzZSB7DQorICAgICAgaWYg KCFFeHBlY3RQcmVmaXgpIHsNCisgICAgICAgIC8vDQorICAgICAgICAvLyBHZXQgWC4NCisgICAg ICAgIC8vDQorICAgICAgICBTdGF0dXMgPSBTdHJIZXhUb1VpbnRuUyAoUG9pbnRlciwgJkVuZCwg JlVpbnRuKTsNCisgICAgICAgIGlmIChSRVRVUk5fRVJST1IgKFN0YXR1cykgfHwgRW5kIC0gUG9p bnRlciA+IDQpIHsNCisgICAgICAgICAgLy8NCisgICAgICAgICAgLy8gTnVtYmVyIG9mIGhleGFk ZWNpbWFsIGRpZ2l0IGNoYXJhY3RlcnMgaXMgbm8gbW9yZSB0aGFuIDQuDQorICAgICAgICAgIC8v DQorICAgICAgICAgIHJldHVybiBSRVRVUk5fVU5TVVBQT1JURUQ7DQorICAgICAgICB9DQorICAg ICAgICBQb2ludGVyID0gRW5kOw0KKyAgICAgICAgLy8NCisgICAgICAgIC8vIFVpbnRuIHdvbid0 IGV4Y2VlZCBNQVhfVUlOVDE2IGlmIG51bWJlciBvZiBoZXhhZGVjaW1hbCBkaWdpdCBjaGFyYWN0 ZXJzIGlzIG5vIG1vcmUgdGhhbiA0Lg0KKyAgICAgICAgLy8NCisgICAgICAgIExvY2FsQWRkcmVz cy5BZGRyW0FkZHJlc3NJbmRleF0gPSAoVUlOVDgpICgoVUlOVDE2KSBVaW50biA+PiA4KTsNCisg ICAgICAgIExvY2FsQWRkcmVzcy5BZGRyW0FkZHJlc3NJbmRleCArIDFdID0gKFVJTlQ4KSBVaW50 bjsNCisgICAgICAgIEFkZHJlc3NJbmRleCArPSAyOw0KKyAgICAgIH0gZWxzZSB7DQorICAgICAg ICAvLw0KKyAgICAgICAgLy8gR2V0IFAsIHRoZW4gZXhpdCB0aGUgbG9vcC4NCisgICAgICAgIC8v DQorICAgICAgICBTdGF0dXMgPSBTdHJEZWNpbWFsVG9VaW50blMgKFBvaW50ZXIsICZFbmQsICZV aW50bik7DQorICAgICAgICBpZiAoUkVUVVJOX0VSUk9SIChTdGF0dXMpIHx8IEVuZCA9PSBQb2lu dGVyIHx8IFVpbnRuID4gMTI4KSB7DQorICAgICAgICAgIC8vDQorICAgICAgICAgIC8vIFByZWZp eCBsZW5ndGggc2hvdWxkIG5vdCBleGNlZWQgMTI4Lg0KKyAgICAgICAgICAvLw0KKyAgICAgICAg ICByZXR1cm4gUkVUVVJOX1VOU1VQUE9SVEVEOw0KKyAgICAgICAgfQ0KKyAgICAgICAgTG9jYWxQ cmVmaXhMZW5ndGggPSAoVUlOVDgpIFVpbnRuOw0KKyAgICAgICAgUG9pbnRlciA9IEVuZDsNCisg ICAgICAgIGJyZWFrOw0KKyAgICAgIH0NCisgICAgfQ0KKw0KKyAgICAvLw0KKyAgICAvLyBTa2lw ICc6JyBvciAiLyINCisgICAgLy8NCisgICAgaWYgKCpQb2ludGVyID09IEwnLycpIHsNCisgICAg ICBFeHBlY3RQcmVmaXggPSBUUlVFOw0KKyAgICB9IGVsc2UgaWYgKCpQb2ludGVyID09IEwnOicp IHsNCisgICAgICBpZiAoQWRkcmVzc0luZGV4ID09IEFSUkFZX1NJWkUgKEFkZHJlc3MtPkFkZHIp KSB7DQorICAgICAgICAvLw0KKyAgICAgICAgLy8gTWVldCBhZGRpdGlvbmFsICI6IiBhZnRlciBh bGwgOCAxNi1iaXQgYWRkcmVzcw0KKyAgICAgICAgLy8NCisgICAgICAgIGJyZWFrOw0KKyAgICAg IH0NCisgICAgfSBlbHNlIHsNCisgICAgICAvLw0KKyAgICAgIC8vIE1lZXQgb3RoZXIgY2hhcmFj dGVyIHRoYXQgaXMgbm90ICIvIiBvciAiOiIg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Vy bWluYXRlZCBVbmljb2RlIHN0cmluZy4NCisgIEBwYXJhbSAgRW5kUG9pbnRlciAgICAgICAgICAg ICAgIFBvaW50ZXIgdG8gY2hhcmFjdGVyIHRoYXQgc3RvcHMgc2Nhbi4NCisgIEBwYXJhbSAgQWRk cmVzcyAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIGNvbnZlcnRlZCBJUHY0IGFkZHJl c3MuDQorICBAcGFyYW0gIFByZWZpeExlbmd0aCAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBj b252ZXJ0ZWQgSVB2NCBhZGRyZXNzIHByZWZpeA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbGVuZ3RoLiBNQVhfVUlOVDggaXMgcmV0dXJuZWQgd2hlbiAvUCBpcw0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90IGluIHRoZSBTdHJpbmcuDQorDQorICBA cmV0dmFsIFJFVFVSTl9TVUNDRVNTICAgICAgICAgICBBZGRyZXNzIGlzIHRyYW5zbGF0ZWQgZnJv bSBTdHJpbmcuDQorICBAcmV0dmFsIFJFVFVSTl9JTlZBTElEX1BBUkFNRVRFUiBJZiBTdHJpbmcg aXMgTlVMTC4NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIERhdGEgaXMg TlVMTC4NCisgIEByZXR2YWwgUkVUVVJOX1VOU1VQUE9SVEVEICAgICAgIElmIFN0cmluZyBpcyBu b3QgaW4gdGhlIGNvcnJlY3QgZm9ybWF0Lg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgSWYgYW55IGRlY2ltYWwgbnVtYmVyIGNvbnZlcnRlZCBmcm9tIEQNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBleGNlZWRzIDI1NS4NCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIElmIHRoZSBkZWNpbWFsIG51bWJlciBjb252ZXJ0ZWQgZnJvbSBQ DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhjZWVkcyAzMi4NCisNCisq Ki8NCitSRVRVUk5fU1RBVFVTDQorRUZJQVBJDQorU3RyVG9JcHY0QWRkcmVzcyAoDQorICBJTiAg Q09OU1QgQ0hBUjE2ICAgICAgICpTdHJpbmcsDQorICBPVVQgQ0hBUjE2ICAgICAgICAgICAgICoq RW5kUG9pbnRlciwgT1BUSU9OQUwNCisgIE9VVCBJUHY0X0FERFJFU1MgICAgICAgKkFkZHJlc3Ms DQorICBPVVQgVUlOVDggICAgICAgICAgICAgICpQcmVmaXhMZW5ndGggT1BUSU9OQUwNCisgICkN Cit7DQorICBSRVRVUk5fU1RBVFVTICAgICAgICAgIFN0YXR1czsNCisgIFVJTlROICAgICAgICAg ICAgICAgICAgQWRkcmVzc0luZGV4Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICBVaW50bjsN CisgIElQdjRfQUREUkVTUyAgICAgICAgICAgTG9jYWxBZGRyZXNzOw0KKyAgVUlOVDggICAgICAg ICAgICAgICAgICBMb2NhbFByZWZpeExlbmd0aDsNCisgIENIQVIxNiAgICAgICAgICAgICAgICAg KlBvaW50ZXI7DQorDQorICBMb2NhbFByZWZpeExlbmd0aCA9IE1BWF9VSU5UODsNCisNCisgIEFT U0VSVCAoKChVSU5UTikgU3RyaW5nICYgQklUMCkgPT0gMCk7DQorDQorICAvLw0KKyAgLy8gMS4g Tm9uZSBvZiBTdHJpbmcgb3IgR3VpZCBzaGFsbCBiZSBhIG51bGwgcG9pbnRlci4NCisgIC8vDQor ICBTQUZFX1NUUklOR19DT05TVFJBSU5UX0NIRUNLICgoU3RyaW5nICE9IE5VTEwpLCANCisgUkVU VVJOX0lOVkFMSURfUEFSQU1FVEVSKTsgIFNBRkVfU1RSSU5HX0NPTlNUUkFJTlRfQ0hFQ0sgKChB ZGRyZXNzICE9IA0KKyBOVUxMKSwgUkVUVVJOX0lOVkFMSURfUEFSQU1FVEVSKTsNCisNCisgIGZv ciAoUG9pbnRlciA9IChDSEFSMTYgKikgU3RyaW5nLCBBZGRyZXNzSW5kZXggPSAwOyBBZGRyZXNz SW5kZXggPCBBUlJBWV9TSVpFIChBZGRyZXNzLT5BZGRyKSArIDE7KSB7DQorICAgIGlmICghSW50 ZXJuYWxJc0RlY2ltYWxEaWdpdENoYXJhY3RlciAoKlBvaW50ZXIpKSB7DQorICAgICAgLy8NCisg ICAgICAvLyBEIG9yIFAgY29udGFpbnMgaW52YWxpZCBjaGFyYWN0ZXJzLg0KKyAgICAgIC8vDQor ICAgICAgYnJlYWs7DQorICAgIH0NCisNCisgICAgLy8NCisgICAgLy8gR2V0IEQgb3IgUC4NCisg ICAgLy8NCisgICAgU3RhdHVzID0gU3RyRGVjaW1hbFRvVWludG5TICgoQ09OU1QgQ0hBUjE2ICop IFBvaW50ZXIsICZQb2ludGVyLCAmVWludG4pOw0KKyAgICBpZiAoUkVUVVJOX0VSUk9SIChTdGF0 dXMpKSB7DQorICAgICAgcmV0dXJuIFJFVFVSTl9VTlNVUFBPUlRFRDsNCisgICAgfQ0KKyAgICBp ZiAoQWRkcmVzc0luZGV4ID09IEFSUkFZX1NJWkUgKEFkZHJlc3MtPkFkZHIpKSB7DQorICAgICAg Ly8NCisgICAgICAvLyBJdCdzIFAuDQorICAgICAgLy8NCisgICAgICBpZiAoVWludG4gPiAzMikg ew0KKyAgICAgICAgcmV0dXJuIFJFVFVSTl9VTlNVUFBPUlRFRDsNCisgICAgICB9DQorICAgICAg TG9jYWxQcmVmaXhMZW5ndGggPSAoVUlOVDgpIFVpbnRuOw0KKyAgICB9IGVsc2Ugew0KKyAgICAg IC8vDQorICAgICAgLy8gSXQncyBELg0KKyAgICAgIC8vDQorICAgICAgaWYgKFVpbnRuID4gTUFY X1VJTlQ4KSB7DQorICAgICAgICByZXR1cm4gUkVUVVJOX1VOU1VQUE9SVEVEOw0KKyAgICAgIH0N CisgICAgICBMb2NhbEFkZHJlc3MuQWRkcltBZGRyZXNzSW5kZXhdID0gKFVJTlQ4KSBVaW50bjsN CisgICAgICBBZGRyZXNzSW5kZXgrKzsNCisgICAgfQ0KKw0KKyAgICAvLw0KKyAgICAvLyBDaGVj ayB0aGUgJy4nIG9yICcvJywgZGVwZW5kaW5nIG9uIHRoZSBBZGRyZXNzSW5kZXguDQorICAgIC8v DQorICAgIGlmIChBZGRyZXNzSW5kZXggPT0gQVJSQVlfU0laRSAoQWRkcmVzcy0+QWRkcikpIHsN CisgICAgICBpZiAoKlBvaW50ZXIgPT0gTCcvJykgew0KKyAgICAgICAgLy8NCisgICAgICAgIC8v ICcvUCcgaXMgaW4gdGhlIFN0cmluZy4NCisgICAgICAgIC8vIFNraXAgIi8iIGFuZCBnZXQgUCBp biBuZXh0IGxvb3AuDQorICAgICAgICAvLw0KKyAgICAgICAgUG9pbnRlcisrOw0KKyAgICAgIH0g ZWxzZSB7DQorICAgICAgICAvLw0KKyAgICAgICAgLy8gJy9QJyBpcyBub3QgaW4gdGhlIFN0cmlu Zy4NCisgICAgICAgIC8vDQorICAgICAgICBicmVhazsNCisgICAgICB9DQorICAgIH0gZWxzZSBp ZiAoQWRkcmVzc0luZGV4IDwgQVJSQVlfU0laRSAoQWRkcmVzcy0+QWRkcikpIHsNCisgICAgICBp ZiAoKlBvaW50ZXIgPT0gTCcuJykgew0KKyAgICAgICAgLy8NCisgICAgICAgIC8vIEQgc2hvdWxk IGJlIGZvbGxvd2VkIGJ5ICcuJw0KKyAgICAgICAgLy8NCisgICAgICAgIFBvaW50ZXIrKzsNCisg ICAgICB9IGVsc2Ugew0KKyAgICAgICAgcmV0dXJuIFJFVFVSTl9VTlNVUFBPUlRFRDsNCisgICAg ICB9DQorICAgIH0NCisgIH0NCisNCisgIGlmIChBZGRyZXNzSW5kZXggPCBBUlJBWV9TSVpFIChB ZGRyZXNzLT5BZGRyKSkgew0KKyAgICByZXR1cm4gUkVUVVJOX1VOU1VQUE9SVEVEOw0KKyAgfQ0K Kw0KKyAg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m9sbG93czoNCisgICAgICAgICAgICAgICAgICBhYSAgICAgICAgICBE YXRhMVsyNDozMV0NCisgICAgICAgICAgICAgICAgICBiYiAgICAgICAgICBEYXRhMVsxNjoyM10N CisgICAgICAgICAgICAgICAgICBjYyAgICAgICAgICBEYXRhMVs4OjE1XQ0KKyAgICAgICAgICAg ICAgICAgIGRkICAgICAgICAgIERhdGExWzA6N10NCisgICAgICAgICAgICAgICAgICBlZSAgICAg ICAgICBEYXRhMls4OjE1XQ0KKyAgICAgICAgICAgICAgICAgIGZmICAgICAgICAgIERhdGEyWzA6 N10NCisgICAgICAgICAgICAgICAgICBnZyAgICAgICAgICBEYXRhM1s4OjE1XQ0KKyAgICAgICAg ICAgICAgICAgIGhoICAgICAgICAgIERhdGEzWzA6N10NCisgICAgICAgICAgICAgICAgICBpaSAg ICAgICAgICBEYXRhNFswOjddDQorICAgICAgICAgICAgICAgICAgamogICAgICAgICAgRGF0YTRb ODoxNV0NCisgICAgICAgICAgICAgICAgICBrayAgICAgICAgICBEYXRhNFsxNjoyM10NCisgICAg ICAgICAgICAgICAgICBsbCAgICAgICAgICBEYXRhNFsyNDozMV0NCisgICAgICAgICAgICAgICAg ICBtbSAgICAgICAgICBEYXRhNFszMjozOV0NCisgICAgICAgICAgICAgICAgICBubiAgICAgICAg ICBEYXRhNFs0MDo0N10NCisgICAgICAgICAgICAgICAgICBvbyAgICAgICAgICBEYXRhNFs0ODo1 NV0NCisgICAgICAgICAgICAgICAgICBwcCAgICAgICAgICBEYXRhNFs1Njo2M10NCisNCisgIElm IFN0cmluZyBpcyBOVUxMLCB0aGVuIEFTU0VSVCgpLg0KKyAgSWYgR3VpZCBpcyBOVUxMLCB0aGVu IEFTU0VSVCgpLg0KKyAgSWYgU3RyaW5nIGlzIG5vdCBhbGlnbmVkIGluIGEgMTYtYml0IGJvdW5k YXJ5LCB0aGVuIEFTU0VSVCgpLg0KKw0KKyAgQHBhcmFtICBTdHJpbmcgICAgICAgICAgICAgICAg ICAgUG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AgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSWYgRGF0YSBpcyBOVUxMLg0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgSWYgTGVuZ3RoIGlzIG5vdCBtdWx0aXBsZSBvZiAyLg0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgUGNkTWF4aW11bVVuaWNvZGVTdHJp bmdMZW5ndGggaXMgbm90IHplcm8sDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgYW5kIExlbmd0aCBpcyBncmVhdGVyIHRoYW4NCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBQY2RNYXhpbXVtVW5pY29kZVN0cmluZ0xlbmd0aC4NCisgIEByZXR2YWwgUkVU VVJOX1VOU1VQUE9SVEVEICAgICAgIElmIExlbmd0aCBvZiBjaGFyYWN0ZXJzIGZyb20gU3RyaW5n IGNvbnRhaW4NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIGNoYXJhY3Rl ciB0aGF0IGlzIG5vdCB2YWxpZCBoZXhhZGVjaW1hbA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGRpZ2l0IGNoYXJhY3RlcnMsIG9yIGEgTnVsbC10ZXJtaW5hdG9yLg0KKyAg QHJldHZhbCBSRVRVUk5fQlVGRkVSX1RPT19TTUFMTCAgSWYgTWF4QnVmZmVyU2l6ZSBpcyBsZXNz IHRoYW4gKExlbmd0aCAvIDIpLg0KKyoqLw0KK1JFVFVSTl9TVEFUVVMNCitFRklBUEkNCitTdHJI ZXhUb0J5dGVzICgNCisgIElOICBDT05TVCBDSEFSMTYgICAgICAgKlN0cmluZywNCisgIElOICBV SU5UTiAgICAgICAgICAgICAgTGVuZ3RoLA0KKyAgT1VUIFVJTlQ4ICAgICAgICAgICAgICAqQnVm ZmVyLA0KKyAgSU4gIFVJTlROICAgICAgICAgICAgICBNYXhCdWZmZXJTaXplDQorICApDQ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