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.4536.1608156758850008660 for ; Wed, 16 Dec 2020 14:12:39 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ikojHNJK; 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=1608156757; 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=rxWyQh0nB44NJw1wAJTfsXLo3Otcaf4ZA5TlvDk0eHs=; b=ikojHNJKaFw0vmNAe7loCcvo3PvBc/jnOBNlBcAsLSykEqRLgNLpN9jWAaAscHoHy//QwJ OBeMBTXIHEZWkkB/RfI96JailQLbUMkj04ow0Dzn1aW+hzEz1hR1T50z7kmZe3J6W6DYJN 5vb0s1zJeVBwYzR0VJCEK3yfWDPTYTM= 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-341-GAb2xRw6POuine2qmgedDw-1; Wed, 16 Dec 2020 17:12:36 -0500 X-MC-Unique: GAb2xRw6POuine2qmgedDw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA08A8144F4; Wed, 16 Dec 2020 22:12:34 +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 39BAB60CCD; Wed, 16 Dec 2020 22:12:30 +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 29/48] OvmfPkg/VirtioFsDxe: add helper for formatting UEFI basenames Date: Wed, 16 Dec 2020 22:11:06 +0100 Message-Id: <20201216211125.19496-30-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.13 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 VGhlIEVGSV9GSUxFX0lORk8gc3RydWN0dXJlLCB3aGljaCBpcyBvdXRwdXQgYnkKRUZJX0ZJTEVf UFJPVE9DT0wuR2V0SW5mbygpLCBlbmRzIHdpdGggYSBmbGV4aWJsZSBDSEFSMTYgYXJyYXkgY2Fs bGVkCiJGaWxlTmFtZSIuIEFkZCB0aGUgVmlydGlvRnNHZXRCYXNlbmFtZSgpIGZ1bmN0aW9uLCBm b3IgZGV0ZXJtaW5pbmcgdGhlCnJlcXVpcmVkIGFycmF5IHNpemUsIGFuZCBmb3IgZmlsbGluZyB0 aGUgYXJyYXkgYXMgd2VsbC4KCkNjOiBBcmQgQmllc2hldXZlbCA8YXJkLmJpZXNoZXV2ZWxAYXJt LmNvbT4KQ2M6IEpvcmRhbiBKdXN0ZW4gPGpvcmRhbi5sLmp1c3RlbkBpbnRlbC5jb20+CkNjOiBQ aGlsaXBwZSBNYXRoaWV1LURhdWTDqSA8cGhpbG1kQHJlZGhhdC5jb20+ClJlZjogaHR0cHM6Ly9i dWd6aWxsYS50aWFub2NvcmUub3JnL3Nob3dfYnVnLmNnaT9pZD0zMDk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aG5hbWUgKGFzIGRlZmluZWQgaW4gdGhlDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uIG9mIFZpcnRpb0ZzQXBwZW5kUGF0aCgpKSB0byBm b3JtYXQNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGxhc3QgY29tcG9uZW50 IG9mLg0KKw0KKyAgQHBhcmFtW291dF0gQmFzZW5hbWUgICAgICAgICBJZiBCYXNlbmFtZVNpemUg aXMgemVybyBvbiBpbnB1dCwgQmFzZW5hbWUgbWF5DQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGJlIE5VTEwuIE90aGVyd2lzZSwgQmFzZW5hbWUgaXMgYWxsb2NhdGVkIGJ5IHRoZQ0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsZXIuIE9uIHN1Y2Nlc3NmdWwgcmV0 dXJuLCBCYXNlbmFtZSBjb250YWlucw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 aGUgbGFzdCBjb21wb25lbnQgb2YgUGF0aCwgZm9ybWF0dGVkIGFzIGENCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgTlVMLXRlcm1pbmF0ZWQgQ0hBUjE2IHN0cmluZy4gV2hlbiBQYXRo IGlzICIvIg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiBpbnB1dCwgQmFzZW5h bWUgaXMgTCIiIG9uIG91dHB1dC4NCisNCisgIEBwYXJhbVtpbixvdXRdIEJhc2VuYW1lU2l6ZSAg T24gaW5wdXQsIHRoZSBudW1iZXIgb2YgYnl0ZXMgdGhlIGNhbGxlcg0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBwcm92aWRlcyBpbiBCYXNlbmFtZS4gT24gb3V0cHV0LCByZWdhcmRs ZXNzIG9mDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZSwgdGhl IG51bWJlciBvZiB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