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

Go to the source code of this file.

Functions

EFI_STATUS VirtioFsFuseRemoveFileOrDir (IN OUT VIRTIO_FS *VirtioFs, IN UINT64 ParentNodeId, IN CHAR8 *Name, IN BOOLEAN IsDir)
 

Detailed Description

FUSE_UNLINK / FUSE_RMDIR wrapper for the Virtio Filesystem device.

Copyright (C) 2020, Red Hat, Inc.

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

Definition in file FuseUnlink.c.

Function Documentation

◆ VirtioFsFuseRemoveFileOrDir()

EFI_STATUS VirtioFsFuseRemoveFileOrDir ( IN OUT VIRTIO_FS VirtioFs,
IN UINT64  ParentNodeId,
IN CHAR8 *  Name,
IN BOOLEAN  IsDir 
)

Remove a regular file or a directory, by sending the FUSE_UNLINK or FUSE_RMDIR 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_UNLINK / FUSE_RMDIR request to. On output, the FUSE request counter "VirtioFs->RequestId" will have been incremented.
[in]ParentNodeIdThe inode number of the directory in which Name should be removed.
[in]NameThe single-component filename to remove in the directory identified by ParentNodeId.
[in]IsDirTRUE if Name refers to a directory, FALSE otherwise.
Return values
EFI_SUCCESSThe file or directory has been removed.
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 43 of file FuseUnlink.c.