diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-16 22:10:47 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 17:16:23 +0000 |
commit | 72d4f133e9674e25d8fbbeda1b6746f9bd29ad7f (patch) | |
tree | 2d9d452cca4b1cacb4ebfaa20a9902f07adfbeac /OvmfPkg/Include/IndustryStandard | |
parent | b62a0c5603da1445682678b49d9c45230cf7af3c (diff) | |
download | edk2-72d4f133e9674e25d8fbbeda1b6746f9bd29ad7f.tar.gz |
OvmfPkg/VirtioFsDxe: add shared wrapper for FUSE_RELEASE / FUSE_RELEASEDIR
The FUSE_RELEASE and FUSE_RELEASEDIR commands only differ in the opcode.
Add a common function called VirtioFsFuseReleaseFileOrDir() for sending
either command.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-11-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/Include/IndustryStandard')
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/VirtioFs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/VirtioFs.h b/OvmfPkg/Include/IndustryStandard/VirtioFs.h index c481053255..c17a43c160 100644 --- a/OvmfPkg/Include/IndustryStandard/VirtioFs.h +++ b/OvmfPkg/Include/IndustryStandard/VirtioFs.h @@ -80,8 +80,10 @@ typedef struct { // FUSE operation codes.
//
typedef enum {
+ VirtioFsFuseOpRelease = 18,
VirtioFsFuseOpInit = 26,
VirtioFsFuseOpOpenDir = 27,
+ VirtioFsFuseOpReleaseDir = 29,
} VIRTIO_FS_FUSE_OPCODE;
#pragma pack (1)
@@ -106,6 +108,16 @@ typedef struct { } VIRTIO_FS_FUSE_RESPONSE;
//
+// Header for VirtioFsFuseOpRelease and VirtioFsFuseOpReleaseDir.
+//
+typedef struct {
+ UINT64 FileHandle;
+ UINT32 Flags;
+ UINT32 ReleaseFlags;
+ UINT64 LockOwner;
+} VIRTIO_FS_FUSE_RELEASE_REQUEST;
+
+//
// Headers for VirtioFsFuseOpInit.
//
typedef struct {
|