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.web10.4908.1608158023521573541 for ; Wed, 16 Dec 2020 14:33:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XSbULPGm; 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=1608158022; 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=LKB0OKk9iW3h4SmYtan6X0O0YoN7KCp/srrDcuXk0sA=; b=XSbULPGmEOLgvIRraF25Axt26tYttCVVMq/nHqik8jH3gJBTaMdlqkYeF+lCkECzCmJqiv XGC4+4tIDupUHTn3/QDXoIz/W+D6xvHLsGpWyqF98hlF5a0HxMb5+5i6UFsn74wAIWrwgl oWAQBVMUml2LgHiXS9PtzUkO2aUQiOk= 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-103-ESZiJYpiP1mz_RiB57YpwA-1; Wed, 16 Dec 2020 17:33:40 -0500 X-MC-Unique: ESZiJYpiP1mz_RiB57YpwA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 731B2107ACE4; Wed, 16 Dec 2020 22:33:39 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-152.ams2.redhat.com [10.36.114.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E6FA60C15; Wed, 16 Dec 2020 22:33:34 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io, virtio-fs@redhat.com, lersek@redhat.com Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2 PATCH 39/48] OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.Write() Date: Wed, 16 Dec 2020 22:11:16 +0100 Message-Id: <20201216211125.19496-40-lersek@redhat.com> In-Reply-To: <20201216211125.19496-1-lersek@redhat.com> References: <20201216211125.19496-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 VXNpbmcgdGhlIGZ1bmN0aW9ucyBpbnRyb2R1Y2VkIHByZXZpb3VzbHksIHdlIGNhbiBub3cgaW1w bGVtZW50ClZpcnRpb0ZzU2ltcGxlRmlsZVdyaXRlKCkuCgpDYzogQXJkIEJpZXNoZXV2ZWwgPGFy ZC5iaWVzaGV1dmVsQGFybS5jb20+CkNjOiBKb3JkYW4gSnVzdGVuIDxqb3JkYW4ubC5qdXN0ZW5A aW50ZWwuY29tPgpDYzogUGhpbGlwcGUgTWF0aGlldS1EYXVkw6kgPHBoaWxtZEByZWRoYXQuY29t PgpSZWY6IGh0dHBzOi8vYnVnemlsbGEudGlhbm9jb3JlLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MzA5 NwpTaWduZWQtb2ZmLWJ5OiBMYXN6bG8gRXJzZWsgPGxlcnNla0ByZWRoYXQuY29tPgotLS0KIE92 bWZQa2cvVmlydGlvRnNEeGUvU2ltcGxlRnNXcml0ZS5jIHwgNjMgKysrKysrKysrKysrKysrKysr Ky0KIDEgZmlsZSBjaGFuZ2VkLCA2MiBpbnNlcnRpb25zKCspLCAxI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