TianoCore EDK2 master
Loading...
Searching...
No Matches
FuseWrite.c File Reference
#include "VirtioFsDxe.h"

Go to the source code of this file.

Functions

EFI_STATUS VirtioFsFuseWrite (IN OUT VIRTIO_FS *VirtioFs, IN UINT64 NodeId, IN UINT64 FuseHandle, IN UINT64 Offset, IN OUT UINT32 *Size, IN VOID *Data)
 

Detailed Description

FUSE_WRITE wrapper for the Virtio Filesystem device.

Copyright (C) 2020, Red Hat, Inc.

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

Definition in file FuseWrite.c.

Function Documentation

◆ VirtioFsFuseWrite()

EFI_STATUS VirtioFsFuseWrite ( IN OUT VIRTIO_FS VirtioFs,
IN UINT64  NodeId,
IN UINT64  FuseHandle,
IN UINT64  Offset,
IN OUT UINT32 *  Size,
IN VOID *  Data 
)

Write a chunk to a regular file, by sending the FUSE_WRITE request to the Virtio Filesystem device.

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_WRITE request to. On output, the FUSE request counter "VirtioFs->RequestId" will have been incremented.
[in]NodeIdThe inode number of the regular file to write to.
[in]FuseHandleThe open handle to the regular file to write to.
[in]OffsetThe absolute file position at which to start writing.
[in,out]SizeOn input, the number of bytes to write. On successful return, the number of bytes actually written, which may be smaller than the value on input.
[in]DataThe buffer to write to the regular file.
Return values
EFI_SUCCESSWrite successful. The caller is responsible for checking Size to learn the actual byte count transferred.
EFI_BAD_BUFFER_SIZEOn input, Size is larger than "VirtioFs->MaxWrite".
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 54 of file FuseWrite.c.