diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-16 22:11:00 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 17:16:23 +0000 |
commit | ca61b84586d59bdda1837ba00eb6e24fa900dc56 (patch) | |
tree | 9fc5aa4fc6db41064f448b59b5ac59f2f9feb759 /OvmfPkg/VirtioFsDxe/VirtioFsDxe.h | |
parent | b6ce961a42f08be13f7fc7a561be530ad58434e5 (diff) | |
download | edk2-ca61b84586d59bdda1837ba00eb6e24fa900dc56.tar.gz |
OvmfPkg/VirtioFsDxe: split canon. path into last parent + last component
Given a canonical pathname (as defined by VirtioFsAppendPath()), different
from "/", introduce a helper function for:
- looking up the NodeId of the most specific parent directory, and
- exposing the last component stand-alone (which is therefore a direct
child of said parent directory).
This splitting operation will be necessary in multiple subsequent patches.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-24-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/VirtioFsDxe/VirtioFsDxe.h')
-rw-r--r-- | OvmfPkg/VirtioFsDxe/VirtioFsDxe.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h index b2e4adce09..6ae5c36f7f 100644 --- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h +++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h @@ -227,6 +227,14 @@ VirtioFsAppendPath ( );
EFI_STATUS
+VirtioFsLookupMostSpecificParentDir (
+ IN OUT VIRTIO_FS *VirtioFs,
+ IN OUT CHAR8 *Path,
+ OUT UINT64 *DirNodeId,
+ OUT CHAR8 **LastComponent
+ );
+
+EFI_STATUS
VirtioFsFuseAttrToEfiFileInfo (
IN VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE *FuseAttr,
OUT EFI_FILE_INFO *FileInfo
|