summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioFsDxe/FuseLookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/VirtioFsDxe/FuseLookup.c')
-rw-r--r--OvmfPkg/VirtioFsDxe/FuseLookup.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/OvmfPkg/VirtioFsDxe/FuseLookup.c b/OvmfPkg/VirtioFsDxe/FuseLookup.c
index 5c9a825e17..f2bda8a547 100644
--- a/OvmfPkg/VirtioFsDxe/FuseLookup.c
+++ b/OvmfPkg/VirtioFsDxe/FuseLookup.c
@@ -52,21 +52,21 @@
**/
EFI_STATUS
VirtioFsFuseLookup (
- IN OUT VIRTIO_FS *VirtioFs,
- IN UINT64 DirNodeId,
- IN CHAR8 *Name,
- OUT UINT64 *NodeId,
- OUT VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE *FuseAttr
+ IN OUT VIRTIO_FS *VirtioFs,
+ IN UINT64 DirNodeId,
+ IN CHAR8 *Name,
+ OUT UINT64 *NodeId,
+ OUT VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE *FuseAttr
)
{
- VIRTIO_FS_FUSE_REQUEST CommonReq;
- VIRTIO_FS_IO_VECTOR ReqIoVec[2];
- VIRTIO_FS_SCATTER_GATHER_LIST ReqSgList;
- VIRTIO_FS_FUSE_RESPONSE CommonResp;
- VIRTIO_FS_FUSE_NODE_RESPONSE NodeResp;
- VIRTIO_FS_IO_VECTOR RespIoVec[3];
- VIRTIO_FS_SCATTER_GATHER_LIST RespSgList;
- EFI_STATUS Status;
+ VIRTIO_FS_FUSE_REQUEST CommonReq;
+ VIRTIO_FS_IO_VECTOR ReqIoVec[2];
+ VIRTIO_FS_SCATTER_GATHER_LIST ReqSgList;
+ VIRTIO_FS_FUSE_RESPONSE CommonResp;
+ VIRTIO_FS_FUSE_NODE_RESPONSE NodeResp;
+ VIRTIO_FS_IO_VECTOR RespIoVec[3];
+ VIRTIO_FS_SCATTER_GATHER_LIST RespSgList;
+ EFI_STATUS Status;
//
// Set up the scatter-gather lists.
@@ -98,8 +98,13 @@ VirtioFsFuseLookup (
//
// Populate the common request header.
//
- Status = VirtioFsFuseNewRequest (VirtioFs, &CommonReq, ReqSgList.TotalSize,
- VirtioFsFuseOpLookup, DirNodeId);
+ Status = VirtioFsFuseNewRequest (
+ VirtioFs,
+ &CommonReq,
+ ReqSgList.TotalSize,
+ VirtioFsFuseOpLookup,
+ DirNodeId
+ );
if (EFI_ERROR (Status)) {
goto Fail;
}
@@ -132,8 +137,10 @@ VirtioFsFuseLookup (
if (CommonResp.Error == VIRTIO_FS_FUSE_ERRNO_ENOENT) {
return EFI_NOT_FOUND;
}
+
Status = VirtioFsErrnoToEfiStatus (CommonResp.Error);
}
+
goto Fail;
}