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

Go to the source code of this file.

Functions

EFI_STATUS VirtioFsFuseOpenOrCreate (IN OUT VIRTIO_FS *VirtioFs, IN UINT64 ParentNodeId, IN CHAR8 *Name, OUT UINT64 *NodeId, OUT UINT64 *FuseHandle)
 

Detailed Description

FUSE_CREATE wrapper for the Virtio Filesystem device.

Copyright (C) 2020, Red Hat, Inc.

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

Definition in file FuseOpenOrCreate.c.

Function Documentation

◆ VirtioFsFuseOpenOrCreate()

EFI_STATUS VirtioFsFuseOpenOrCreate ( IN OUT VIRTIO_FS VirtioFs,
IN UINT64  ParentNodeId,
IN CHAR8 *  Name,
OUT UINT64 *  NodeId,
OUT UINT64 *  FuseHandle 
)

Send a FUSE_CREATE request to the Virtio Filesystem device, for opening a regular file with (O_RDWR | O_CREAT) semantics.

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_CREATE request to. On output, the FUSE request counter "VirtioFs->RequestId" will have been incremented.
[in]ParentNodeIdThe inode number of the direct parent directory of the regular file to open or create.
[in]NameThe single-component filename of the regular file to open or create, under the parent directory identified by ParentNodeId.
[out]NodeIdThe inode number of the regular file, returned by the Virtio Filesystem device.
[out]FuseHandleThe open file handle returned by the Virtio Filesystem device.
Return values
EFI_SUCCESSThe regular file has been opened, and (if necessary) created.
Returns
The "errno" value mapped to an EFI_STATUS code, if the Virtio Filesystem device explicitly reported an error.
Error codes propagated from VirtioFsSgListsValidate(), VirtioFsFuseNewRequest(), VirtioFsSgListsSubmit(), VirtioFsFuseCheckResponse().

Definition at line 48 of file FuseOpenOrCreate.c.