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>
This commit is contained in:
committed by
mergify[bot]
parent
b62a0c5603
commit
72d4f133e9
@@ -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)
|
||||
@@ -105,6 +107,16 @@ typedef struct {
|
||||
UINT64 Unique;
|
||||
} 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.
|
||||
//
|
||||
|
Reference in New Issue
Block a user