summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2020-12-16 22:10:44 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-21 17:16:23 +0000
commite8a74c9a0712f4d282807aca442a787afe4075ab (patch)
tree8d5741831899cba01148e9f5ec172b80d4cde3c8 /OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
parent6a2dc768f058ce96479e7ed524d27fcf59657f5b (diff)
downloadedk2-e8a74c9a0712f4d282807aca442a787afe4075ab.tar.gz
edk2-e8a74c9a0712f4d282807aca442a787afe4075ab.tar.bz2
edk2-e8a74c9a0712f4d282807aca442a787afe4075ab.zip
OvmfPkg/VirtioFsDxe: map "errno" values to EFI_STATUS
The VirtioFsFuseCheckResponse() function dedicates the EFI_DEVICE_ERROR status code to the case when the Virtio Filesystem device explicitly returns an error via the "VIRTIO_FS_FUSE_RESPONSE.Error" field. Said field effectively carries a Linux "errno" value. Introduce a helper function for mapping "errno" values to (hopefully) reasonable EFI_STATUS codes. This way we'll be able to propagate "errno" values as EFI_STATUS return codes along the UEFI call stack -- in some detail anyway. 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-8-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/VirtioFsDxe/VirtioFsDxe.h')
-rw-r--r--OvmfPkg/VirtioFsDxe/VirtioFsDxe.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
index f7eae9a4b7..772ab743cc 100644
--- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
+++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
@@ -149,6 +149,11 @@ VirtioFsFuseCheckResponse (
OUT UINTN *TailBufferFill
);
+EFI_STATUS
+VirtioFsErrnoToEfiStatus (
+ IN INT32 Errno
+ );
+
//
// EFI_SIMPLE_FILE_SYSTEM_PROTOCOL member functions for the Virtio Filesystem
// driver.