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.4573.1608156892123446554 for ; Wed, 16 Dec 2020 14:14:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LF2qKWj/; 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=1608156891; 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=oMhdDZB340oKfZ81ndf5FDQQzRqft7Pu56owZLm4F3I=; b=LF2qKWj/NEM/7qisTZWETWM056eUIIru5/hJD4W2HRDXuoMvvls1ZRuLJGsQ5g4yCnOVDt Y5RoEyFlkgDoCHKBsg1zRjNn/orpXHEe+QqTNfHecXKrGocaPJQolkm6++cikY6LlrEMsH Lh6H219XHRGUU4yyWAo02Eh+u7IbNpA= 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-112-x76iCGCKMcGeVWFIlIuHOg-1; Wed, 16 Dec 2020 17:14:46 -0500 X-MC-Unique: x76iCGCKMcGeVWFIlIuHOg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDC9B107ACE4; Wed, 16 Dec 2020 22:14:45 +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 F2D2819C9B; Wed, 16 Dec 2020 22:14:35 +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 30/48] OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.GetInfo() Date: Wed, 16 Dec 2020 22:11:07 +0100 Message-Id: <20201216211125.19496-31-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.11 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 bGVtZW50ClZpcnRpb0ZzU2ltcGxlRmlsZUdldEluZm8oKS4KClRoaXMgYWxsb3dzIHRoZSAiVk9M IiBjb21tYW5kIHRvIHdvcmsgaW4gdGhlIFVFRkkgc2hlbGwuCgpDYzogQXJkIEJpZXNoZXV2ZWwg PGFyZC5iaWVzaGV1dmVsQGFybS5jb20+CkNjOiBKb3JkYW4gSnVzdGVuIDxqb3JkYW4ubC5qdXN0 ZW5AaW50ZWwuY29tPgpDYzogUGhpbGlwcGUgTWF0aGlldS1EYXVkw6kgPHBoaWxtZEByZWRoYXQu Y29tPgpSZWY6IGh0dHBzOi8vYnVnemlsbGEudGlhbm9jb3JlLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9 MzA5NwpTaWduZWQtb2ZmLWJ5OiBMYXN6bG8gRXJzZWsgPGxlcnNla0ByZWRoYXQuY29tPgotLS0K IE92bWZQa2cvVmlydGlvRnNEeGUvVmlydGlvRnNEeGUuaW5mIC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oqDQorICBQcm92aWRlIEVGSV9GSUxFX1NZU1RFTV9JTkZPIGFib3V0IHRoZSBmaWxl c3lzdGVtIHRoaXMgZmlsZSBsaXZlcyBvbi4NCisqKi8NCitTVEFUSUMNCitFRklfU1RBVFVTDQor R2V0RmlsZVN5c3RlbUluZm8gKA0KKyAgSU4gICAgIEVGSV9GSUxFX1BST1RPQ09MICpUaGlzLA0K KyAgSU4gT1VUIFVJTlROICAgICAgICAgICAgICpCdWZmZXJTaXplLA0KKyAgICAgT1VUIFZPSUQg ICAgICAgICAgICAgICpCdWZmZXINCisgICkNCit7DQorICBWSVJUSU9fRlNfRklMRSAgICAgICAg ICAgICAgICAgKlZpcnRpb0ZzRmlsZTsNCisgIFZJUlRJT19GUyAgICAgICAgICAgICAgICAgICAg ICAqVmlydGlvRnM7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgQWxsb2NTaXpl Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgIExhYmVsU2l6ZTsNCisgIEVGSV9T VEFUVVMgICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBWSVJUSU9fRlNfRlVTRV9TVEFU RlNfUkVTUE9OU0UgRmlsZXN5c0F0dHI7DQorICBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAg ICAgTWF4QmxvY2tzOw0KKyAgRUZJX0ZJTEVfU1lTVEVNX0lORk8gICAgICAgICAgICpGaWxlc3lz SW5mbzsNCisNCisgIFZpcnRpb0ZzRmlsZSA9IFZJUlRJT19GU19GSUxFX0ZST01fU0lNUExFX0ZJ TEUgKFRoaXMpOw0KKyAgVmlydGlvRnMgICAgID0gVmlydGlvRnNGaWxlLT5Pd25lckZzOw0KKw0K KyAgQWxsb2NTaXplID0gKkJ1ZmZlclNpemU7DQorDQorICAvLw0KKyAgLy8gQ2FsY3VsYXRlIHRo ZSBuZWVkZWQgc2l6ZS4NCisgIC8vDQorICBMYWJlbFNpemUgPSBTdHJTaXplIChWaXJ0a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