From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on072b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::72b]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 244BE1A1E2B for ; Wed, 24 Aug 2016 08:10:10 -0700 (PDT) Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.151) by CS1PR84MB0231.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.153) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9; Wed, 24 Aug 2016 15:09:57 +0000 Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) by CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) with mapi id 15.01.0599.010; Wed, 24 Aug 2016 15:09:58 +0000 From: "Shah, Tapan" To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Jaben Carsey Thread-Topic: [edk2] [PATCH 3/3] Revert "ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib" Thread-Index: AQHR/On5MXxdULZvlkGm6bXZdNe2F6BWjytAgAGqERA= Date: Wed, 24 Aug 2016 15:09:58 +0000 Message-ID: References: <20160823025609.468312-1-ruiyu.ni@intel.com> <20160823025609.468312-4-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=tapandshah@hpe.com; x-originating-ip: [15.203.227.10] x-ms-office365-filtering-correlation-id: 354abcde-2acc-4947-a5b1-08d3cc30b6ca x-microsoft-exchange-diagnostics: 1; CS1PR84MB0231; 6:ejifR2+57fvU0UYIo0h+pGOFnRSkydKYmkoVWXC5NQszd+0tLuPG82uvNqQeqTjMGBwie2OnJC3V5nScuMG0mwq5eBnYvZjhZmMKXpG8tnKNhMwXmnHu7gJqfRUlTt5mv876X8d8r6Ig3GVfKxvgi8p8TtDXNyWlDzkU234BkAZfjvcbztbQwKsK8iuwMsMvITe0qZRxVazfqv3g7FO2KFPvmdmNt6ehVNoMOYIBrx3NHREkYKZJrj+OGf6DkN7nrd4xoU2n61/FkV9Vt9b/gYogP5Jj/rf9Rnl7pvcMojbFQVZd+XZ5xg08+PGYl0x+I/JfAFJd2uacEnD/kDcoaw==; 5:hUNSyThUWAG2C+qVYWUCmxsQ8W2SifOf8eBc65e8Or6ZejVKaPOLTj5qd07WxI7d3xJHR2e0jtewPqCwJ+aSZgwi34CFc1p8jKNXUbDFtEpDTDKs386J6emGT1e3htEdPD9Sjv33k3ILJ3XtXIH4Bg==; 24:HRJYrKA8FQNw3uMPKbA5LTXOnlt6yFR2zGuzH9x4gykoqLllCZgsOmyvyMzwMzRjlDU3IUmcpnD1YdXMSEBjigy1N8EoS5mpTsrOu9FWc+k=; 7:j6JLAn2VkNstx4/0BplBZjTrrFlJpEdPVlH5Gr5S395w0i10mlkIFxlsHblSfzsAcuvCMhgHzylVKTzHtMi6lQPevgrDzwcTO7CYTQ8FJ0sGYaMhghaB2PMlwxPxpEX9sITSNVc5GufK6ujkhiDUWHk1WR+W3YwT11FqqsEosOi8VxTxCX51zhkNZRis3BjjpCHXtnCdZRfGJTMjCIwPbzCyanrdYYgV8q0G9HD2g6nAhb5ooetO8UTIZ5ij1K4S x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0231; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:CS1PR84MB0231; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0231; x-forefront-prvs: 0044C17179 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(377454003)(189002)(13464003)(199003)(3280700002)(74316002)(305945005)(106356001)(87936001)(77096005)(19580405001)(7736002)(7696003)(5660300001)(2900100001)(7846002)(101416001)(9686002)(76176999)(54356999)(4326007)(19580395003)(33656002)(86362001)(575784001)(99286002)(586003)(6116002)(3846002)(102836003)(15975445007)(50986999)(2906002)(105586002)(8676002)(81156014)(189998001)(66066001)(97736004)(2501003)(106116001)(122556002)(5001770100001)(92566002)(3900700001)(10400500002)(3660700001)(81166006)(5002640100001)(8936002)(68736007)(579004); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0231; H:CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2016 15:09:58.3299 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0231 Subject: Re: [PATCH 3/3] Revert "ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib" 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: Wed, 24 Aug 2016 15:10:10 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGF2ZSB5b3UgYWxyZWFkeSBwdXNoZWQgdGhpcyBjaGFuZ2U/DQoNCi0tLS0tT3JpZ2luYWwgTWVz c2FnZS0tLS0tDQpGcm9tOiBTaGFoLCBUYXBhbiANClNlbnQ6IFR1Z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gZm91bmQgb24g dGhlIHNwZWNpZmllZCBzdHJpbmcNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorR2V0TmV4 dFBhcmFtZXRlcigNCisgIElOIE9VVCBDSEFSMTYgICAqKldhbGtlciwNCisgIElOIE9VVCBDSEFS MTYgICAqKlRlbXBQYXJhbWV0ZXIsDQorICBJTiBDT05TVCBVSU5UTiAgTGVuZ3RoLA0KKyAgSU4g Qk9PTEVBTiAgICAgIFN0cmlwUXVvdGF0aW9uDQorICApDQorew0KKyAgQ09OU1QgQ0hBUjE2ICpO ZXh0RGVsaW07DQorDQorICBpZiAoV2Fsa2VyICAgICAgICAgICA9PSBOVUxMDQorICAgIHx8Kldh bGtlciAgICAgICAgICA9PSBOVUxMDQorICAgIHx8VGVtcFBhcmFtZXRlciAgICA9PSBOVUxMDQor ICAgIHx8KlRlbXBQYXJhbWV0ZXIgICA9PSBOVUxMDQorICAgICl7DQorICAgIHJldHVybiAoRUZJ X0lOVkFMSURfUEFSQU1FVEVSKTsNCisgIH0NCisNCisNCisgIC8vDQorICAvLyBtYWtlIHN1cmUg d2UgZG9udCBoYXZlIGFueSBsZWFkaW5nIHNwYWNlcyAgLy8gIHdoaWxlICgoKldhbGtlcilbMF0g DQorID09IEwnICcpIHsNCisgICAgICAoKldhbGtlcikrKzsNCisgIH0NCisNCisgIC8vDQorICAv LyBtYWtlIHN1cmUgd2Ugc3RpbGwgaGF2ZSBzb21lIHBhcmFtcyBub3cuLi4NCisgIC8vDQorICBp ZiAoU3RyTGVuKCpXYWxrZXIpID09IDApIHsNCitERUJVR19DT0RFX0JFR0lOKCk7DQorICAgICpX YWxrZXIgICAgICAgID0gTlVMTDsNCitERUJVR19DT0RFX0VORCgpOw0KKyAgICByZXR1cm4gKEVG SV9JTlZBTElEX1BBUkFNRVRFUik7DQorICB9DQorDQorICBOZXh0RGVsaW0gPSBGaW5kRW5kT2ZQ YXJhbWV0ZXIoKldhbGtlcik7DQorDQorICBpZiAoTmV4dER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gaXMgYSBVRUZJIFNoZWxsIDIuMCBvciBhbiBFRkkgc2hlbGwuDQotLQ0KMi45LjAud2lu ZG93cy4xDQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f DQplZGsyLWRldmVsIG1haWxpbmcgbGlzdA0KZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCmh0dHBz Oi8vbGlzdHMuMDEub3JnL21haWxtYW4vbGlzdGluZm8vZWRrMi1kZXZlbA0K