TianoCore EDK2 master
Loading...
Searching...
No Matches
SimpleFsFlush.c
Go to the documentation of this file.
1
9#include "VirtioFsDxe.h"
10
12EFIAPI
13VirtioFsSimpleFileFlush (
15 )
16{
17 VIRTIO_FS_FILE *VirtioFsFile;
18 VIRTIO_FS *VirtioFs;
19 EFI_STATUS Status;
20
21 VirtioFsFile = VIRTIO_FS_FILE_FROM_SIMPLE_FILE (This);
22 VirtioFs = VirtioFsFile->OwnerFs;
23
24 if (!VirtioFsFile->IsOpenForWriting) {
25 return EFI_ACCESS_DENIED;
26 }
27
28 //
29 // FUSE_FLUSH is for regular files only.
30 //
31 if (!VirtioFsFile->IsDirectory) {
32 Status = VirtioFsFuseFlush (
33 VirtioFs,
34 VirtioFsFile->NodeId,
35 VirtioFsFile->FuseHandle
36 );
37 if (EFI_ERROR (Status)) {
38 return Status;
39 }
40 }
41
43 VirtioFs,
44 VirtioFsFile->NodeId,
45 VirtioFsFile->FuseHandle,
46 VirtioFsFile->IsDirectory
47 );
48 return Status;
49}
EFI_STATUS VirtioFsFuseFlush(IN OUT VIRTIO_FS *VirtioFs, IN UINT64 NodeId, IN UINT64 FuseHandle)
Definition: FuseFlush.c:37
EFI_STATUS VirtioFsFuseFsyncFileOrDir(IN OUT VIRTIO_FS *VirtioFs, IN UINT64 NodeId, IN UINT64 FuseHandle, IN BOOLEAN IsDir)
Definition: FuseFsync.c:42
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29