diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-16 22:11:06 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 17:16:23 +0000 |
commit | 44bc78790e1b307b87fcc3c54885ae84471254a2 (patch) | |
tree | 4e0c2bba496f2818e434485e40e31f37b8bd06e9 /OvmfPkg/VirtioFsDxe/VirtioFsDxe.h | |
parent | ba1184630ae54af0ad3bdbb97982d740cf50e9be (diff) | |
download | edk2-44bc78790e1b307b87fcc3c54885ae84471254a2.tar.gz edk2-44bc78790e1b307b87fcc3c54885ae84471254a2.tar.bz2 edk2-44bc78790e1b307b87fcc3c54885ae84471254a2.zip |
OvmfPkg/VirtioFsDxe: add helper for formatting UEFI basenames
The EFI_FILE_INFO structure, which is output by
EFI_FILE_PROTOCOL.GetInfo(), ends with a flexible CHAR16 array called
"FileName". Add the VirtioFsGetBasename() function, for determining the
required array size, and for filling the array as well.
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-30-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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h index 029c568b39..d1b746c0d8 100644 --- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h +++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h @@ -235,6 +235,13 @@ VirtioFsLookupMostSpecificParentDir ( );
EFI_STATUS
+VirtioFsGetBasename (
+ IN CHAR8 *Path,
+ OUT CHAR16 *Basename OPTIONAL,
+ IN OUT UINTN *BasenameSize
+ );
+
+EFI_STATUS
VirtioFsFuseAttrToEfiFileInfo (
IN VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE *FuseAttr,
OUT EFI_FILE_INFO *FileInfo
|