From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@citrix.com header.s=securemail header.b=YH2fhRBF; spf=softfail (domain: citrix.com, ip: , mailfrom: anthony.perard@citrix.com) Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com []) by groups.io with SMTP; Fri, 13 Sep 2019 07:51:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568386269; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jTKvjUp5MG+SlTcncG/XYtjxy0nl66C15Z37YLYDQ0Q=; b=YH2fhRBF4pUIk5cYcVOmKSSi/NiyBj6Tq5Q6UAF57penuD93PD1s+GcH 721odgY/DlzO+nKJs0cImRQflphACeZXB/BOizG1PgkhxJkggErcS2kJi DfZCT+pC37e553E8W0BHHRwZaewA1B5/M4hO5T+BQUQQLcRQ+qoyupioy k=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: lYc55WjN7DLFF/94kPZhz/5fiRMImHBHN9+v6Yr2BSEsGGkaV0QxtOu/syDD4oBCrr8YaS5gMD TdBOTowDeAFuDbK5Sp4NROknBTxyrQrajgwZsxYmnEdjXSRYQFhOTfsLt6HfJ/j5nFcMWXQPPA 7IxbwL6n4ifCH7D/F8IZWHvvZd64d91ZUbBVXJMAVEjg9gynWSxHBSNKi2TQ6JYhwEQ8xH79g2 OC6euPSkxNZxleGuTbhaEr+PPAmJwNeHyOKaPneZUDfdZH/4EypDz8Iy/vahUMBrcQFYFKSXcR dJM= X-SBRS: 2.7 X-MesageID: 5595149 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,501,1559534400"; d="scan'208";a="5595149" From: "Anthony PERARD" To: CC: Ard Biesheuvel , Julien Grall , Jordan Justen , , Anthony Perard , Laszlo Ersek Subject: [PATCH 05/11] OvmfPkg/XenBusDxe: Construct paths without allocation Date: Fri, 13 Sep 2019 15:50:54 +0100 Message-ID: <20190913145100.303433-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913145100.303433-1-anthony.perard@citrix.com> References: <20190913145100.303433-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: base64 Content-Type: text/plain V2hlbiBkb2luZyBhbiBhY3Rpb24gd2l0aCBhIHBhdGggYW5kIHN1YnBhdGggaW4gdGhlIHhlbnN0 b3JlLApYZW5TdG9yZUpvaW4ga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