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.4936.1608158149011425336 for ; Wed, 16 Dec 2020 14:35:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TUSv1t/0; 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=1608158148; 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=fS50eye0s3hF5oKcag74t/AY/aHEYjnU6yvNvKA3aVk=; b=TUSv1t/0jd+cAvEThTvv/6IWZZbS8o0iLcZAp6EsKJdq7Ss6zUlyTVmJPJe246gb0XDivi m55oVllUTvwGFgfGCoA0tiCSwFSaeIwPKgzct0W7NoZ2rIMDBlVQdXbcxkWgD97mNYSEP6 KR/HVvqrPJpMv38jvezytTPFNhYWWEs= 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-578-lJ2RemhuO5uKJ4Ee4wDADA-1; Wed, 16 Dec 2020 17:35:46 -0500 X-MC-Unique: lJ2RemhuO5uKJ4Ee4wDADA-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 60BD010054FF; Wed, 16 Dec 2020 22:35: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 9295617577; Wed, 16 Dec 2020 22:35:40 +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 40/48] OvmfPkg/VirtioFsDxe: handle the volume label in EFI_FILE_PROTOCOL.SetInfo Date: Wed, 16 Dec 2020 22:11:17 +0100 Message-Id: <20201216211125.19496-41-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 VGhlIGxlYXN0IGNvbXBsaWNhdGVkIHRoaXJkIG9mIEVGSV9GSUxFX1BST1RPQ09MLlNldEluZm8o KSBpcyB0byBoYW5kbGUKdGhlIEVGSV9GSUxFX1NZU1RFTV9JTkZPIGFuZCBFRklfRklMRV9TWVNU RU1fVk9MVU1FX0xBQkVMIHNldHRpbmcKcmVxdWVzdHMuIEJvdGggb2YgdGhvc2UgY2FuIG9ubHkg Y2hhbmdlIHRoZSB2b2x1bWUgbGFiZWwgLS0gd2hpY2ggdGhlClZpcnRpbyBGaWxlc3lzdGVtIGRl dmljZSBkb2VzIG5vdCBzdXBwb3J0LgoKVmVyaWZ5IHRoZSBpbnB1dCBmb3Igd2VsbC1mb3JtZWRu ZXNzLCBhbmQgcmVwb3J0IHN1Y2Nlc3Mgb25seSBpZiB0aGUKdm9sdW1lIGxhYmVsIGlzIGJlaW5n IHNldCB0byBpdHMgY3VycmVudCB2YWx1ZS4KCkNjOiBBcmQgQmllc2hldXZlbCA8YXJkLmJpZXNo ZXV2ZWxAYXJtLmNvbT4KQ2M6IEpvcmRhbiBKdXN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HVUlELA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW5jbHVkaW5nIGEgc2luZ2xlIENIQVIxNiBlbGVtZW50IGZyb20g dGhlDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFpbGluZyBOYW1lIGZp ZWxkLg0KKw0KKyAgQHBhcmFtW2luXSBJc1NpemVCeUluZm9QcmVzZW50ICAgVFJVRSBpZiBhbmQg b25seSBpZiB0aGUgZXhwZWN0ZWQgc3RydWN0dXJlDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzdGFydHMgd2l0aCBhIFVJTlQ2NCBTaXplIGZpZWxkIHRoYXQgcmVwb3J0cw0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGFjdHVhbCBzdHJ1Y3R1cmUg c2l6ZS4NCisNCisgIEBwYXJhbVtpbl0gQnVmZmVyICAgICAgICAgICAgICAgIFRoZSBCdWZmZXIg cGFyYW1ldGVyIGFzIHByb3ZpZGVkIGJ5IHRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRUZJX0ZJTEVfUFJPVE9DT0wuU2V0SW5mbygpIGNhbGxlci4NCisNCisgIEByZXR2 YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICBWYWxpZGF0aW9uIHN1Y2Nlc3NmdWwsIEJ1ZmZlciBp cyB3ZWxsLWZvcm1lZC4NCisNCisgIEByZXR2YWwgRUZJX0JBRF9CVUZGRVJfU0laRSAgICBUaGUg RUZJX0ZJTEVfUFJPVE9DT0wuU2V0SW5mbygpDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY2FsbGVyIHByb3ZpZGVkIGEgQnVmZmVyU2l6ZSB0aGF0IGlzIHNtYWxsZXINCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGFuIHRoZSBtaW5pbXVtIHN0cnVjdHVyZSBz aXplIHJlcXVpcmVkIGZvcg0KKy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