From nobody Mon Feb 9 21:36:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69040+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69040+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608156385; cv=none; d=zohomail.com; s=zohoarc; b=fYFtKtz9irCjfQiGdNknrzIVJc2Rb1g0pIOgtJZXHhIie2xN2axu95Ztv0MwGBkF7PdMSFsJJ0ve0SV9t1rWS7DQgwuaoOX/FXHgqexvU+HcGIOSQ7eIRtD1fQpBuG3mYzWkKu6wX+Lbk8VyIZVz1upslfZYi4JwNqq0PEWxtbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608156385; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=GLCtgAi1YuOWdfd3zDmd+uryd1zokjRDdDO2Stf3yUo=; b=CqcNu5GBw4k/T5Gxm997kl/zciMBlEVugO8kcCI7XyGO/JAZYpnnv87yJa1mO6uk90x4ZmRpDPEjkSDiw0SBdwAA4wHXatOZiKN1Fg6EKIWWr+o/J+11MT56kZ79D1RyTIRuiovM7j73V1hR1hcJLEoDOzJMSqAot7h07hHM7lU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69040+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608156385155514.219983245091; Wed, 16 Dec 2020 14:06:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id g6SZYY1788612xpJSSxaDz2l; Wed, 16 Dec 2020 14:06:24 -0800 X-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.web08.4374.1608156383810038864 for ; Wed, 16 Dec 2020 14:06:24 -0800 X-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-299-5Wt_bqQ1OOuHdFqxa_rHsQ-1; Wed, 16 Dec 2020 17:06:16 -0500 X-MC-Unique: 5Wt_bqQ1OOuHdFqxa_rHsQ-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00E9C800D53; Wed, 16 Dec 2020 22:06:15 +0000 (UTC) X-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 100AB5D9C0; Wed, 16 Dec 2020 22:06:09 +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-devel] [edk2 PATCH 26/48] OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.Open() Date: Wed, 16 Dec 2020 22:11:03 +0100 Message-Id: <20201216211125.19496-27-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.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com X-Gm-Message-State: 1wc0nvl3M2A6fYkM7kUBZXA8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608156384; bh=GLCtgAi1YuOWdfd3zDmd+uryd1zokjRDdDO2Stf3yUo=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=QFGfq0TUNQnwHj+LQky4wIpNq6IBx50ozLOsH/EzcbM5ZTc8Q5oB14Xj5/kzvet/Zgr S/6GtuMtArTr8QbnoxzC2k1HLkqcpmYdMbCAgcbJ6Nf7HtVmVlAKPbxqEENLmOz2NgTJ8 aX1QngrkHIM7g+vb30p7PenAPOmrUcZxVbk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Using the functions introduced previously, we can now implement VirtioFsSimpleFileOpen(). This lets the "MKDIR" command to work in the UEFI shell, for example. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Philippe Mathieu-Daud=C3=A9 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3097 Signed-off-by: Laszlo Ersek --- OvmfPkg/VirtioFsDxe/SimpleFsOpen.c | 480 +++++++++++++++++++- 1 file changed, 479 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c b/OvmfPkg/VirtioFsDxe/Simpl= eFsOpen.c index f0e249184079..2649c796ac97 100644 --- a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c +++ b/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c @@ -1,22 +1,500 @@ /** @file EFI_FILE_PROTOCOL.Open() member function for the Virtio Filesystem drive= r. =20 Copyright (C) 2020, Red Hat, Inc. =20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 +#include // AsciiStrCmp() +#include // AllocatePool() + #include "VirtioFsDxe.h" =20 +/** + Open the root directory, possibly for writing. + + @param[in,out] VirtioFs The Virtio Filesystem device whose root direc= tory + should be opened. + + @param[out] NewHandle The new EFI_FILE_PROTOCOL instance through wh= ich + the root directory can be accessed. + + @param[in] OpenForWriting TRUE if the root directory should be opened f= or + read-write access. FALSE if the root directory + should be opened for read-only access. Openin= g the + root directory for read-write access is usefu= l for + calling EFI_FILE_PROTOCOL.Flush() or + EFI_FILE_PROTOCOL.SetInfo() later, for syncin= g or + touching the root directory, respectively. + + @retval EFI_SUCCESS The root directory has been opened successful= ly. + + @retval EFI_ACCESS_DENIED OpenForWriting is TRUE, but the root director= y is + marked as read-only. + + @return Error codes propagated from underlying functi= ons. +**/ +STATIC +EFI_STATUS +OpenRootDirectory ( + IN OUT VIRTIO_FS *VirtioFs, + OUT EFI_FILE_PROTOCOL **NewHandle, + IN BOOLEAN OpenForWriting + ) +{ + EFI_STATUS Status; + VIRTIO_FS_FILE *NewVirtioFsFile; + + // + // VirtioFsOpenVolume() opens the root directory for read-only access. I= f the + // current request is to open the root directory for read-write access, = so + // that EFI_FILE_PROTOCOL.Flush() or EFI_FILE_PROTOCOL.SetInfo()+timesta= mps + // can be used on the root directory later, then we have to check for wr= ite + // permission first. + // + if (OpenForWriting) { + VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE FuseAttr; + EFI_FILE_INFO FileInfo; + + Status =3D VirtioFsFuseGetAttr (VirtioFs, VIRTIO_FS_FUSE_ROOT_DIR_NODE= _ID, + &FuseAttr); + if (EFI_ERROR (Status)) { + return Status; + } + Status =3D VirtioFsFuseAttrToEfiFileInfo (&FuseAttr, &FileInfo); + if (EFI_ERROR (Status)) { + return Status; + } + if ((FileInfo.Attribute & EFI_FILE_READ_ONLY) !=3D 0) { + return EFI_ACCESS_DENIED; + } + } + + Status =3D VirtioFsOpenVolume (&VirtioFs->SimpleFs, NewHandle); + if (EFI_ERROR (Status)) { + return Status; + } + + NewVirtioFsFile =3D VIRTIO_FS_FILE_FROM_SIMPLE_FILE (*NewHandle); + NewVirtioFsFile->IsOpenForWriting =3D OpenForWriting; + return EFI_SUCCESS; +} + +/** + Open an existent regular file or non-root directory. + + @param[in,out] VirtioFs The Virtio Filesystem device on which the + regular file or directory should be opened. + + @param[in] DirNodeId The inode number of the immediate parent + directory of the regular file or directory = to + open. + + @param[in] Name The single-component filename of the regular + file or directory to open, under the immedi= ate + parent directory identified by DirNodeId. + + @param[in] OpenForWriting TRUE if the regular file or directory shoul= d be + opened for read-write access. FALSE if the + regular file or directory should be opened = for + read-only access. Opening a directory for + read-write access is useful for deleting, + renaming, syncing or touching the directory + later. + + @param[out] NodeId The inode number of the regular file or + directory, returned by the Virtio Filesystem + device. + + @param[out] FuseHandle The open handle to the regular file or + directory, returned by the Virtio Filesystem + device. + + @param[out] NodeIsDirectory Set to TRUE on output if Name was found to = refer + to a directory. Set to FALSE if Name was fo= und + to refer to a regular file. + + @retval EFI_SUCCESS The regular file or directory has been looked= up + and opened successfully. + + @retval EFI_ACCESS_DENIED OpenForWriting is TRUE, but the regular file = or + directory is marked read-only. + + @retval EFI_NOT_FOUND A directory entry called Name was not found i= n the + directory identified by DirNodeId. (EFI_NOT_F= OUND + is not returned for any other condition.) + + @return Errors propagated from underlying functions. = If + the error code to propagate were EFI_NOT_FOUN= D, it + is remapped to EFI_DEVICE_ERROR. +**/ +STATIC +EFI_STATUS +OpenExistentFileOrDirectory ( + IN OUT VIRTIO_FS *VirtioFs, + IN UINT64 DirNodeId, + IN CHAR8 *Name, + IN BOOLEAN OpenForWriting, + OUT UINT64 *NodeId, + OUT UINT64 *FuseHandle, + OUT BOOLEAN *NodeIsDirectory + ) +{ + EFI_STATUS Status; + UINT64 ResolvedNodeId; + VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE FuseAttr; + EFI_FILE_INFO FileInfo; + BOOLEAN IsDirectory; + UINT64 NewFuseHandle; + + Status =3D VirtioFsFuseLookup (VirtioFs, DirNodeId, Name, &ResolvedNodeI= d, + &FuseAttr); + if (EFI_ERROR (Status)) { + return Status; + } + Status =3D VirtioFsFuseAttrToEfiFileInfo (&FuseAttr, &FileInfo); + if (EFI_ERROR (Status)) { + goto ForgetResolvedNodeId; + } + + if (OpenForWriting && (FileInfo.Attribute & EFI_FILE_READ_ONLY) !=3D 0) { + Status =3D EFI_ACCESS_DENIED; + goto ForgetResolvedNodeId; + } + + IsDirectory =3D (BOOLEAN)((FileInfo.Attribute & EFI_FILE_DIRECTORY) !=3D= 0); + if (IsDirectory) { + // + // If OpenForWriting is TRUE here, that's not passed to + // VirtioFsFuseOpenDir(); it does not affect the FUSE_OPENDIR request = we + // send. OpenForWriting=3DTRUE will only permit attempts to delete, re= name, + // flush (sync), and touch the directory. + // + Status =3D VirtioFsFuseOpenDir (VirtioFs, ResolvedNodeId, &NewFuseHand= le); + } else { + Status =3D VirtioFsFuseOpen (VirtioFs, ResolvedNodeId, OpenForWriting, + &NewFuseHandle); + } + if (EFI_ERROR (Status)) { + goto ForgetResolvedNodeId; + } + + *NodeId =3D ResolvedNodeId; + *FuseHandle =3D NewFuseHandle; + *NodeIsDirectory =3D IsDirectory; + return EFI_SUCCESS; + +ForgetResolvedNodeId: + VirtioFsFuseForget (VirtioFs, ResolvedNodeId); + return (Status =3D=3D EFI_NOT_FOUND) ? EFI_DEVICE_ERROR : Status; +} + +/** + Create a directory. + + @param[in,out] VirtioFs The Virtio Filesystem device on which the direc= tory + should be created. + + @param[in] DirNodeId The inode number of the immediate parent direct= ory + of the directory to create. + + @param[in] Name The single-component filename of the directory = to + create, under the immediate parent directory + identified by DirNodeId. + + @param[out] NodeId The inode number of the directory created, retu= rned + by the Virtio Filesystem device. + + @param[out] FuseHandle The open handle to the directory created, retur= ned + by the Virtio Filesystem device. + + @retval EFI_SUCCESS The directory has been created successfully. + + @return Errors propagated from underlying functions. +**/ +STATIC +EFI_STATUS +CreateDirectory ( + IN OUT VIRTIO_FS *VirtioFs, + IN UINT64 DirNodeId, + IN CHAR8 *Name, + OUT UINT64 *NodeId, + OUT UINT64 *FuseHandle + ) +{ + EFI_STATUS Status; + UINT64 NewChildDirNodeId; + UINT64 NewFuseHandle; + + Status =3D VirtioFsFuseMkDir (VirtioFs, DirNodeId, Name, &NewChildDirNod= eId); + if (EFI_ERROR (Status)) { + return Status; + } + + Status =3D VirtioFsFuseOpenDir (VirtioFs, NewChildDirNodeId, &NewFuseHan= dle); + if (EFI_ERROR (Status)) { + goto RemoveNewChildDir; + } + + *NodeId =3D NewChildDirNodeId; + *FuseHandle =3D NewFuseHandle; + return EFI_SUCCESS; + +RemoveNewChildDir: + VirtioFsFuseRemoveFileOrDir (VirtioFs, DirNodeId, Name, TRUE /* IsDir */= ); + VirtioFsFuseForget (VirtioFs, NewChildDirNodeId); + return Status; +} + +/** + Create a regular file. + + @param[in,out] VirtioFs The Virtio Filesystem device on which the regul= ar + file should be created. + + @param[in] DirNodeId The inode number of the immediate parent direct= ory + of the regular file to create. + + @param[in] Name The single-component filename of the regular fi= le to + create, under the immediate parent directory + identified by DirNodeId. + + @param[out] NodeId The inode number of the regular file created, + returned by the Virtio Filesystem device. + + @param[out] FuseHandle The open handle to the regular file created, + returned by the Virtio Filesystem device. + + @retval EFI_SUCCESS The regular file has been created successfully. + + @return Errors propagated from underlying functions. +**/ +STATIC +EFI_STATUS +CreateRegularFile ( + IN OUT VIRTIO_FS *VirtioFs, + IN UINT64 DirNodeId, + IN CHAR8 *Name, + OUT UINT64 *NodeId, + OUT UINT64 *FuseHandle + ) +{ + return VirtioFsFuseOpenOrCreate (VirtioFs, DirNodeId, Name, NodeId, + FuseHandle); +} + EFI_STATUS EFIAPI VirtioFsSimpleFileOpen ( IN EFI_FILE_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes ) { - return EFI_NO_MEDIA; + VIRTIO_FS_FILE *VirtioFsFile; + VIRTIO_FS *VirtioFs; + BOOLEAN OpenForWriting; + BOOLEAN PermitCreation; + BOOLEAN CreateDirectoryIfCreating; + VIRTIO_FS_FILE *NewVirtioFsFile; + EFI_STATUS Status; + CHAR8 *NewCanonicalPath; + BOOLEAN RootEscape; + UINT64 DirNodeId; + CHAR8 *LastComponent; + UINT64 NewNodeId; + UINT64 NewFuseHandle; + BOOLEAN NewNodeIsDirectory; + + VirtioFsFile =3D VIRTIO_FS_FILE_FROM_SIMPLE_FILE (This); + VirtioFs =3D VirtioFsFile->OwnerFs; + + // + // Validate OpenMode. + // + switch (OpenMode) { + case EFI_FILE_MODE_READ: + OpenForWriting =3D FALSE; + PermitCreation =3D FALSE; + break; + case EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE: + OpenForWriting =3D TRUE; + PermitCreation =3D FALSE; + break; + case EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE: + OpenForWriting =3D TRUE; + PermitCreation =3D TRUE; + break; + default: + return EFI_INVALID_PARAMETER; + } + + // + // Validate the Attributes requested for the case when the file ends up = being + // created, provided creation is permitted. + // + if (PermitCreation) { + if ((Attributes & ~EFI_FILE_VALID_ATTR) !=3D 0) { + // + // Unknown attribute requested. + // + return EFI_INVALID_PARAMETER; + } + + ASSERT (OpenForWriting); + if ((Attributes & EFI_FILE_READ_ONLY) !=3D 0) { + DEBUG (( + DEBUG_ERROR, + ("%a: Label=3D\"%s\" CanonicalPathname=3D\"%a\" FileName=3D\"%s\" " + "OpenMode=3D0x%Lx Attributes=3D0x%Lx: nonsensical request to poss= ibly " + "create a file marked read-only, for read-write access\n"), + __FUNCTION__, + VirtioFs->Label, + VirtioFsFile->CanonicalPathname, + FileName, + OpenMode, + Attributes + )); + return EFI_INVALID_PARAMETER; + } + CreateDirectoryIfCreating =3D (BOOLEAN)((Attributes & + EFI_FILE_DIRECTORY) !=3D 0); + } + + // + // Referring to a file relative to a regular file makes no sense (or at = least + // it cannot be implemented consistently with how a file is referred to + // relative to a directory). + // + if (!VirtioFsFile->IsDirectory) { + DEBUG (( + DEBUG_ERROR, + ("%a: Label=3D\"%s\" CanonicalPathname=3D\"%a\" FileName=3D\"%s\": " + "nonsensical request to open a file or directory relative to a regu= lar " + "file\n"), + __FUNCTION__, + VirtioFs->Label, + VirtioFsFile->CanonicalPathname, + FileName + )); + return EFI_INVALID_PARAMETER; + } + + // + // Allocate the new VIRTIO_FS_FILE object. + // + NewVirtioFsFile =3D AllocatePool (sizeof *NewVirtioFsFile); + if (NewVirtioFsFile =3D=3D NULL) { + return EFI_OUT_OF_RESOURCES; + } + + // + // Create the canonical pathname at which the desired file is expected to + // exist. + // + Status =3D VirtioFsAppendPath (VirtioFsFile->CanonicalPathname, FileName, + &NewCanonicalPath, &RootEscape); + if (EFI_ERROR (Status)) { + goto FreeNewVirtioFsFile; + } + if (RootEscape) { + Status =3D EFI_ACCESS_DENIED; + goto FreeNewCanonicalPath; + } + + // + // If the desired file is the root directory, just open the volume one m= ore + // time, without looking up anything. + // + if (AsciiStrCmp (NewCanonicalPath, "/") =3D=3D 0) { + FreePool (NewCanonicalPath); + FreePool (NewVirtioFsFile); + return OpenRootDirectory (VirtioFs, NewHandle, OpenForWriting); + } + + // + // Split the new canonical pathname into most specific parent directory + // (given by DirNodeId) and last pathname component (i.e., immediate chi= ld + // within that parent directory). + // + Status =3D VirtioFsLookupMostSpecificParentDir (VirtioFs, NewCanonicalPa= th, + &DirNodeId, &LastComponent); + if (EFI_ERROR (Status)) { + goto FreeNewCanonicalPath; + } + + // + // Try to open LastComponent directly under DirNodeId, as an existent re= gular + // file or directory. + // + Status =3D OpenExistentFileOrDirectory (VirtioFs, DirNodeId, LastCompone= nt, + OpenForWriting, &NewNodeId, &NewFuseHandle, &NewNodeIsDirecto= ry); + // + // If LastComponent could not be found under DirNodeId, but the request + // allows us to create a new entry, attempt creating the requested regul= ar + // file or directory. + // + if (Status =3D=3D EFI_NOT_FOUND && PermitCreation) { + ASSERT (OpenForWriting); + if (CreateDirectoryIfCreating) { + Status =3D CreateDirectory (VirtioFs, DirNodeId, LastComponent, &New= NodeId, + &NewFuseHandle); + } else { + Status =3D CreateRegularFile (VirtioFs, DirNodeId, LastComponent, + &NewNodeId, &NewFuseHandle); + } + NewNodeIsDirectory =3D CreateDirectoryIfCreating; + } + + // + // Regardless of the branch taken, we're done with DirNodeId. + // + if (DirNodeId !=3D VIRTIO_FS_FUSE_ROOT_DIR_NODE_ID) { + VirtioFsFuseForget (VirtioFs, DirNodeId); + } + + if (EFI_ERROR (Status)) { + goto FreeNewCanonicalPath; + } + + // + // Populate the new VIRTIO_FS_FILE object. + // + NewVirtioFsFile->Signature =3D VIRTIO_FS_FILE_SIG; + NewVirtioFsFile->SimpleFile.Revision =3D EFI_FILE_PROTOCOL_REVISION; + NewVirtioFsFile->SimpleFile.Open =3D VirtioFsSimpleFileOpen; + NewVirtioFsFile->SimpleFile.Close =3D VirtioFsSimpleFileClose; + NewVirtioFsFile->SimpleFile.Delete =3D VirtioFsSimpleFileDelete; + NewVirtioFsFile->SimpleFile.Read =3D VirtioFsSimpleFileRead; + NewVirtioFsFile->SimpleFile.Write =3D VirtioFsSimpleFileWrite; + NewVirtioFsFile->SimpleFile.GetPosition =3D VirtioFsSimpleFileGetPositio= n; + NewVirtioFsFile->SimpleFile.SetPosition =3D VirtioFsSimpleFileSetPositio= n; + NewVirtioFsFile->SimpleFile.GetInfo =3D VirtioFsSimpleFileGetInfo; + NewVirtioFsFile->SimpleFile.SetInfo =3D VirtioFsSimpleFileSetInfo; + NewVirtioFsFile->SimpleFile.Flush =3D VirtioFsSimpleFileFlush; + NewVirtioFsFile->IsDirectory =3D NewNodeIsDirectory; + NewVirtioFsFile->IsOpenForWriting =3D OpenForWriting; + NewVirtioFsFile->OwnerFs =3D VirtioFs; + NewVirtioFsFile->CanonicalPathname =3D NewCanonicalPath; + NewVirtioFsFile->NodeId =3D NewNodeId; + NewVirtioFsFile->FuseHandle =3D NewFuseHandle; + + // + // One more file is now open for the filesystem. + // + InsertTailList (&VirtioFs->OpenFiles, &NewVirtioFsFile->OpenFilesEntry); + + *NewHandle =3D &NewVirtioFsFile->SimpleFile; + return EFI_SUCCESS; + +FreeNewCanonicalPath: + FreePool (NewCanonicalPath); + +FreeNewVirtioFsFile: + FreePool (NewVirtioFsFile); + + return Status; } --=20 2.19.1.3.g30247aa5d201 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69040): https://edk2.groups.io/g/devel/message/69040 Mute This Topic: https://groups.io/mt/79023669/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-