TianoCore EDK2 master
Loading...
Searching...
No Matches
FuseLookup.c File Reference
#include <Library/BaseLib.h>
#include "VirtioFsDxe.h"

Go to the source code of this file.

Functions

EFI_STATUS VirtioFsFuseLookup (IN OUT VIRTIO_FS *VirtioFs, IN UINT64 DirNodeId, IN CHAR8 *Name, OUT UINT64 *NodeId, OUT VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE *FuseAttr)
 

Detailed Description

FUSE_LOOKUP wrapper for the Virtio Filesystem device.

Copyright (C) 2020, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FuseLookup.c.

Function Documentation

◆ VirtioFsFuseLookup()

EFI_STATUS VirtioFsFuseLookup ( IN OUT VIRTIO_FS VirtioFs,
IN UINT64  DirNodeId,
IN CHAR8 *  Name,
OUT UINT64 *  NodeId,
OUT VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE FuseAttr 
)

Send a FUSE_LOOKUP request to the Virtio Filesystem device, for resolving a filename to an inode.

The function returns EFI_NOT_FOUND exclusively if the Virtio Filesystem device explicitly responds with ENOENT – "No such file or directory".

The function may only be called after VirtioFsFuseInitSession() returns successfully and before VirtioFsUninit() is called.

Parameters
[in,out]VirtioFsThe Virtio Filesystem device to send the FUSE_LOOKUP request to. On output, the FUSE request counter "VirtioFs->RequestId" will have been incremented.
[in]DirNodeIdThe inode number of the directory in which Name should be resolved to an inode.
[in]NameThe single-component filename to resolve in the directory identified by DirNodeId.
[out]NodeIdThe inode number which Name has been resolved to.
[out]FuseAttrThe VIRTIO_FS_FUSE_ATTRIBUTES_RESPONSE object describing the properties of the resolved inode.
Return values
EFI_SUCCESSFilename to inode resolution successful.
EFI_NOT_FOUNDThe Virtio Filesystem device explicitly reported ENOENT – "No such file or directory".
Returns
The "errno" value mapped to an EFI_STATUS code, if the Virtio Filesystem device explicitly reported an error different from ENOENT. If said mapping resulted in EFI_NOT_FOUND, it is remapped to EFI_DEVICE_ERROR.
Error codes propagated from VirtioFsSgListsValidate(), VirtioFsFuseNewRequest(), VirtioFsSgListsSubmit(), VirtioFsFuseCheckResponse(). EFI_NOT_FOUND is remapped to EFI_DEVICE_ERROR.

Definition at line 54 of file FuseLookup.c.