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.web09.3941.1608155369949877993 for ; Wed, 16 Dec 2020 13:49:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ABsLJkQv; 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=1608155369; 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=5E2g0eh6DogW1MTEWmTxLq7rlmWNKPQBhGcI3+mhvqk=; b=ABsLJkQvyccHRsNmmmP0p19Y0GOyI3s0tCeB/ZBpTJ+0I8YPg3yeY5pMBDDWmbBRdIP0Sy rYh3cupKCbAhbt1oOgEQud5yBjpJ4INMczhdo3doUTCUUW4snclgQXcZ36RVN/lt8i5Unt KHxeAP4b7ggSnHSO2pw6G7ApRLrCNRY= 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-105-87Hy5rmqOA6y4dMuUuJS6A-1; Wed, 16 Dec 2020 16:49:27 -0500 X-MC-Unique: 87Hy5rmqOA6y4dMuUuJS6A-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 498F81842141; Wed, 16 Dec 2020 21:49:26 +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 9536F1754A; Wed, 16 Dec 2020 21:49:18 +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 18/48] OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_OPEN Date: Wed, 16 Dec 2020 22:10:55 +0100 Message-Id: <20201216211125.19496-19-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.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 QWRkIHRoZSBWaXJ0aW9Gc0Z1c2VPcGVuKCkgZnVuY3Rpb24sIGZvciBzZW5kaW5nIHRoZSBGVVNF X09QRU4gY29tbWFuZCB0bwp0aGUgVmlydGlvIEZpbGVzeXN0ZW0gZGV2aWNlLgoKQ2M6IEFyZCBC aWVzaGV1dmVsIDxhcmQuYmllc2hldXZlbEBhcm0uY29tPgpDYzogSm9yZGFuIEp1c3RlbiA8am9y ZGFuLmwuanVzdGVuQGludGVsLmNvbT4KQ2M6IFBoaWxpcHBlIE1hdGhpZXUtRGF1ZMOpIDxwaGls bWRAcmVkaGF0LmNvbT4KUmVmOiBodHRwczovL2J1Z3ppbGxhLnRpYW5vY29yZS5vcmcvc2hvd19i dWcuY2dpP2lkPTMwOTcKU2lnbmVkLW9mZi1ieTogTGFzemxvIEVyc2VrIDxsZXJzZWtAcmVkaGF0 LmNvbT4KLS0tCiBPdm1mUGtnL0luY2x1ZGUvSW5kdXN0cnlTdGFuZGFyZC9WaXJ0aW9Gcy5oIHwg IDM1ICsrKy0tLQogT3ZtZlBrZy9WaXJ0aW9Gc0R4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