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

Go to the source code of this file.

Functions

EFI_STATUS VirtioFsFuseInitSession (IN OUT VIRTIO_FS *VirtioFs)
 

Detailed Description

FUSE_INIT wrapper for the Virtio Filesystem device.

Copyright (C) 2020, Red Hat, Inc.

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

Definition in file FuseInit.c.

Function Documentation

◆ VirtioFsFuseInitSession()

EFI_STATUS VirtioFsFuseInitSession ( IN OUT VIRTIO_FS VirtioFs)

Send a FUSE_INIT request to the Virtio Filesystem device, for starting the FUSE session.

From virtio-v1.1-cs01-87fa6b5d8155, 5.11.5 Device Initialization: "On initialization the driver first discovers the device's virtqueues. The FUSE session is started by sending a FUSE_INIT request as defined by the FUSE protocol on one request virtqueue."

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

Parameters
[in,out]VirtioFsThe Virtio Filesystem device to send the FUSE_INIT request to. The FUSE request counter "VirtioFs->RequestId" is set to 1 on output. The maximum write buffer size exposed in the FUSE_INIT response is saved in "VirtioFs->MaxWrite", on output.
Return values
EFI_SUCCESSThe FUSE session has been started.
EFI_UNSUPPORTEDFUSE interface version or feature negotiation failed.
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 45 of file FuseInit.c.