Last change
on this file since 94264 was 89983, checked in by vboxsync, 4 years ago |
Devices/EFI: Merge edk-stable202105 and openssl 1.1.1j and make it build, bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
957 bytes
|
Line | |
---|
1 | /** @file
|
---|
2 | EFI_FILE_PROTOCOL.Flush() member function for the Virtio Filesystem driver.
|
---|
3 |
|
---|
4 | Copyright (C) 2020, Red Hat, Inc.
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #include "VirtioFsDxe.h"
|
---|
10 |
|
---|
11 | EFI_STATUS
|
---|
12 | EFIAPI
|
---|
13 | VirtioFsSimpleFileFlush (
|
---|
14 | IN EFI_FILE_PROTOCOL *This
|
---|
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 (VirtioFs, VirtioFsFile->NodeId,
|
---|
33 | VirtioFsFile->FuseHandle);
|
---|
34 | if (EFI_ERROR (Status)) {
|
---|
35 | return Status;
|
---|
36 | }
|
---|
37 | }
|
---|
38 |
|
---|
39 | Status = VirtioFsFuseFsyncFileOrDir (VirtioFs, VirtioFsFile->NodeId,
|
---|
40 | VirtioFsFile->FuseHandle, VirtioFsFile->IsDirectory);
|
---|
41 | return Status;
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.