OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_RENAME2
Add the VirtioFsFuseRename() function, for sending the FUSE_RENAME2 command to the Virtio Filesystem device. 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-42-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
c9f473df33
commit
bea1f51d6e
@@ -141,6 +141,11 @@ typedef struct {
|
||||
) \
|
||||
)
|
||||
|
||||
//
|
||||
// Flags for VirtioFsFuseOpRename2.
|
||||
//
|
||||
#define VIRTIO_FS_FUSE_RENAME2_REQ_F_NOREPLACE BIT0
|
||||
|
||||
//
|
||||
// FUSE operation codes.
|
||||
//
|
||||
@@ -164,6 +169,7 @@ typedef enum {
|
||||
VirtioFsFuseOpFsyncDir = 30,
|
||||
VirtioFsFuseOpCreate = 35,
|
||||
VirtioFsFuseOpReadDirPlus = 44,
|
||||
VirtioFsFuseOpRename2 = 45,
|
||||
} VIRTIO_FS_FUSE_OPCODE;
|
||||
|
||||
#pragma pack (1)
|
||||
@@ -398,6 +404,15 @@ typedef struct {
|
||||
UINT32 Namelen;
|
||||
UINT32 Type;
|
||||
} VIRTIO_FS_FUSE_DIRENTPLUS_RESPONSE;
|
||||
|
||||
//
|
||||
// Header for VirtioFsFuseOpRename2.
|
||||
//
|
||||
typedef struct {
|
||||
UINT64 NewDir;
|
||||
UINT32 Flags;
|
||||
UINT32 Padding;
|
||||
} VIRTIO_FS_FUSE_RENAME2_REQUEST;
|
||||
#pragma pack ()
|
||||
|
||||
#endif // VIRTIO_FS_H_
|
||||
|
Reference in New Issue
Block a user