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.4609.1608157015614290733 for ; Wed, 16 Dec 2020 14:16:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I7cxSOaZ; 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=1608157014; 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=2ibz76dTM+z5ZIJr+ErJyZJknAfbY/onQZBMqWKvhAg=; b=I7cxSOaZ27yRnRoZJW8TJreosHn2DwkpD6XcQ2PgjgLDmrMgxDoun1KXS3zgKrrkPUqHoz Bhp6D2O6OJDgbQiLNJm7BZIwRSiPuJkvo1dbwWhK76SWTOdgEdsv9Fj+3qCU4rH4CEDSK8 n/WMANUTAaGaPmbIukXRnXzMZGSUK0g= 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-483-wSsW0N-qPOSr8RMfOUg9ug-1; Wed, 16 Dec 2020 17:16:53 -0500 X-MC-Unique: wSsW0N-qPOSr8RMfOUg9ug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C753A801B13; Wed, 16 Dec 2020 22:16:51 +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 ED63619D9F; Wed, 16 Dec 2020 22:16:46 +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 31/48] OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.GetPosition, .SetPosition Date: Wed, 16 Dec 2020 22:11:08 +0100 Message-Id: <20201216211125.19496-32-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.84 on 10.5.11.23 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 bGVtZW50ClZpcnRpb0ZzU2ltcGxlRmlsZUdldFBvc2l0aW9uKCkgYW5kIFZpcnRpb0ZzU2ltcGxl RmlsZVNldFBvc2l0aW9uKCkuCgpDYzogQXJkIEJpZXNoZXV2ZWwgPGFyZC5iaWVzaGV1dmVsQGFy bS5jb20+CkNjOiBKb3JkYW4gSnVzdGVuIDxqb3JkYW4ubC5qdXN0ZW5AaW50ZWwuY29tPgpDYzog UGhpbGlwcGUgTWF0aGlldS1EYXVkw6kgPHBoaWxtZEByZWRoYXQuY29tPgpSZWY6IGh0dHBzOi8v YnVnemlsbGEudGlhbm9jb3JlLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MzA5NwpTaWduZWQtb2ZmLWJ5 OiBMYXN6bG8gRXJzZWsgPGxlcnNla0ByZWRoYXQuY29tPgotLS0KIE92bWZQa2cvVmlydGlvRnNE eGUvVmlydGlvRnNEeGUuaCAgICAgICAgIHw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