From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web10.15222.1609774972409313347 for ; Mon, 04 Jan 2021 07:42:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YRwwRlfQ; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609774971; 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=pSud1up9+U8nLZzldtrEGEuykhwudImXLSqxG4mFr2w=; b=YRwwRlfQtBdKqVasWh0wMQ83lBYwG9CvKiqoife0R3oAM9lUy6GtMXX4Ty0tC2X/8Ckwo5 qgEMgrmNbjP2vQdJfMw/+2gdEnqil1g7yK4r7cLZvD6M+qFp7mLDpoe9CH3vPAjapJwxAv dp+PQpJ/RJEkPO/CsfmjcTdDMN5Fi1U= 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-308-DDp83wNBMUywQrBvtH_pYg-1; Mon, 04 Jan 2021 10:42:42 -0500 X-MC-Unique: DDp83wNBMUywQrBvtH_pYg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47C2714552B; Mon, 4 Jan 2021 15:42:41 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-80.ams2.redhat.com [10.36.113.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26B82100239A; Mon, 4 Jan 2021 15:42:39 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ray Ni , Zhichao Gao Subject: [PATCH 1/8] ShellPkg/Comp: add file buffering Date: Mon, 4 Jan 2021 16:42:28 +0100 Message-Id: <20210104154235.31785-2-lersek@redhat.com> In-Reply-To: <20210104154235.31785-1-lersek@redhat.com> References: <20210104154235.31785-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 cyBvbiBteSBsYXB0b3AsIHVzaW5n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ZXR1cm4sIEJ5dGVzUmVhZCBpcyBzZXQgdG8gMSBp ZiB0aGUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgYnl0ZSBmcm9tIEZpbGVC dWZmZXIgaGFzIGJlZW4gc3RvcmVkIHRvIEJ5dGUuDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBPbiBzdWNjZXNzZnVsIHJldHVybiwgQnl0ZXNSZWFkIGlzIHNldCB0byAwIGlmDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBGaWxlQnVmZmVyIGlzIGVtcHR5LCBhbmQgRmlsZUhh bmRsZSBpcyBhdCBFT0YuDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXaGVuIGFuIGVy cm9yIGlzIHJldHVybmVkLCBCeXRlc1JlYWQgaXMgbm90IHNldC4NCisNCisgIEBwYXJhbVtvdXRd IEJ5dGUgICAgICAgICAgIE9uIG91dHB1dCwgdGhlIG5leHQgYnl0ZSBmcm9tIEZpbGVCdWZmZXIu IE9ubHkgc2V0DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYSkgRUZJX1NVQ0NF U1MgaXMgcmV0dXJuZWQgYW5kIChiKSBCeXRlc1JlYWQNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGlzIHNldCB0byAxIG9uIG91dHB1dC4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1Mg IEJ5dGVzUmVhZCBoYXMgYmVlbiBzZXQgdG8gMCBvciAxLiBJbiB0aGUgbGF0dGVyIGNhc2UsDQor ICAgICAgICAgICAgICAgICAgICAgICBCeXRlIGhhcyBiZWVuIHNldCBhcyB3ZWxsLg0KKw0KKyAg QHJldHVybiAgICAgICAgICAgICAgRXJyb3IgY29kZXMgcHJvcGFnYXRlZCBmcm9tDQorICAgICAg ICAgICAgICAgICAgICAgICBnRWZpU2hlbGxQcm90b2NvbC0+UmVhZEZpbGUoKS4NCisqKi8NCitT VEFUSUMNCitFRklfU1RBVF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