From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web11.5496.1610528110190179458 for ; Wed, 13 Jan 2021 00:55:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T22TmJxA; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610528109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MhXuDM+lyXZIwhucYlKWyhwGgJDOCefHJG7kwIu82Mo=; b=T22TmJxATC5EH3jImgGLegoyKSuo5L3qtaV9qH8aY8PIdEFD/JPiDCVGCElRihgD4lksGh 1lYeMqGAMnPUbaMxsS3h+gxvsYy1QFJByaxp+XglslWDOxJ2FBCSXhjN0hlETs2BBDL8UN jq5DkRqw5duj8oDR14hs7+0C4GmT1e4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-Jz1UVM_4MFSVeojQbaP2AQ-1; Wed, 13 Jan 2021 03:55:02 -0500 X-MC-Unique: Jz1UVM_4MFSVeojQbaP2AQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 331E28144E6; Wed, 13 Jan 2021 08:55:01 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-238.ams2.redhat.com [10.36.112.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A2AD5C239; Wed, 13 Jan 2021 08:54:58 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ray Ni , Zhichao Gao Subject: [PATCH v2 01/10] ShellPkg/Comp: add file buffering Date: Wed, 13 Jan 2021 09:54:44 +0100 Message-Id: <20210113085453.10168-2-lersek@redhat.com> In-Reply-To: <20210113085453.10168-1-lersek@redhat.com> References: <20210113085453.10168-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 VGhlIENPTVAgc2hlbGwgY29tbWFuZCBjb21wYXJlcyB0d28gZmlsZXMgYnl0ZSBmb3IgYnl0ZS4g SW4gb3JkZXIgdG8KcmV0cmlldmUgdGhlIGJ5dGVzIHRvIGNvbXBhcmUsIGl0IGN1cnJlbnRseSBp bnZva2VzCmdFZmlTaGVsbFByb3RvY29sLT5SZWFkRmlsZSgpIG9uIGJvdGggZmlsZXMsIHVzaW5n IGEgc2luZ2xlLWJ5dGUgYnVmZmVyCmV2ZXJ5IHRpbWUuIFRoaXMgaXMgdmVyeSBpbmVmZmljaWVu dDsgdGhlIHVuZGVybHlpbmcKRUZJX0ZJTEVfUFJPVE9DT0wuUmVhZCgpIGZ1bmN0aW9uIG1heSBi ZSBjb3N0bHkuCgpSZWFkIGJvdGggZmlsZSBvcGVyYW5kcyBpbiBjaHVua3Mgb2YgIlBjZFNoZWxs RmlsZU9wZXJhdGlvblNpemUiIGJ5dGVzLgpEcmF3IGJ5dGVzIGZvciBjb21wYXJpc29uIGZyb20g dGhlIGludGVybmFsIHJlYWQtYWhlYWQgYnVmZmVycy4KClNvbWUgYWQtaG9jIG1lYXN1cmVtZW50 cyBvbiBteSBsYXB0b3AsIHVzaW5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Q0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5p dGlhbGl6ZWQgd2l0aCBGaWxlQnVmZmVySW5pdCgpLg0KKw0KKyAgQHBhcmFtW291dF0gQnl0ZXNS ZWFkICAgICAgT24gc3VjY2Vzc2Z1bCByZXR1cm4sIEJ5dGVzUmVhZCBpcyBzZXQgdG8gMSBpZiB0 aGUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgYnl0ZSBmcm9tIEZpbGVCdWZm ZXIgaGFzIGJlZW4gc3RvcmVkIHRvIEJ5dGUuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBPbiBzdWNjZXNzZnVsIHJldHVybiwgQnl0ZXNSZWFkIGlzIHNldCB0byAwIGlmDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBGaWxlQnVmZmVyIGlzIGVtcHR5LCBhbmQgRmlsZUhhbmRs ZSBpcyBhdCBFT0YuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXaGVuIGFuIGVycm9y IGlzIHJldHVybmVkLCBCeXRlc1JlYWQgaXMgbm90IHNldC4NCisNCisgIEBwYXJhbVtvdXRdIEJ5 dGUgICAgICAgICAgIE9uIG91dHB1dCwgdGhlIG5leHQgYnl0ZSBmcm9tIEZpbGVCdWZmZXIuIE9u bHkgc2V0DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYSkgRUZJX1NVQ0NFU1Mg aXMgcmV0dXJuZWQgYW5kIChiKSBCeXRlc1JlYWQNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGlzIHNldCB0byAxIG9uIG91dHB1dC4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgIEJ5 dGVzUmVhZCBoYXMgYmVlbiBzZXQgdG8gMCBvciAxLiBJbiB0aGUgbGF0dGVyIGNhc2UsDQorICAg ICAgICAgICAgICAgICAgICAgICBCeXRlIGhhcyBiZWVuIHNldCBhcyB3ZWxsLg0KKw0KKyAgQHJl dHVybiAgICAgICAgICAgICAgRXJyb3IgY29kZXMgcHJvcGFnYXRlZCBmcm9tDQorICAgICAgICAg ICAgICAgICAgICAgICBnRWZpU2hlbGxQcm90b2NvbC0+UmVhZEZpbGUoKS4NCisqKi8NCitTVEFU SUMNCitFRklfU1RBVFVTDQorRmlsZUJ1ZmZlclJlYWRCeXRlICgNCisgIElOICAgICBTSEVMTF9G SUxFX0hBTkRMRSBGaWxlSGFuZGxlLA0KKyAgSU4gT1VUIEZJTEVfQlVGRkVSICAgICAgICpGaWxl QnVmZmVyLA0KKyAgICAgT1VUIFVJTlROICAgICAgICAgICAgICpCeXRlc1JlYWQsDQorICAgICBP VVQgVUlOVDggICAgICAgICAgICAgKkJ5dGUNCisgICkNCit7DQorICBVSU5UTiAgICAgIFJlYWRT aXplOw0KKyAgRUZJX1NUQVRVUyBTdGF0dXM7DQorDQorICBpZiAoRmlsZUJ1ZmZlci0+TGVmdCA9 PSAwKSB7DQorICAgIFJlYWRTaXplID0gRmlsZUJ1ZmZlci0+QWxsb2NhdGVkOw0KKyAgICBTdGF0 dXMgPSBnRWZpU2hlbGxQcm90b2NvbC0+UmVhZEZpbGUgKEZpbGVIYW5kbGUsICZSZWFkU2l6ZSwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmlsZUJ1ZmZlci0+RGF0YSk7DQor ICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAg ICB9DQorICAgIGlmIChSZWFkU2l6ZSA9PSAwKSB7DQorICAgICAgKkJ5dGVzUmVhZCA9IDA7DQor ICAgICAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KKyAgICB9DQorICAgIEZpbGVCdWZmZXItPk5leHQg PSAwOw0KKyAgICBGaWxlQnVmZmVyLT5MZWZ0ID0gUmVhZFNpemU7DQorICB9DQorDQorICAqQnl0 ZXNSZWFkID0gMTsNCisgICpCeXRlICAgICAgPSBGaWxlQnVmZmVyLT5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