OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_CREATE
Add the VirtioFsFuseOpenOrCreate() function, for sending the FUSE_CREATE 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-21-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
f058cb69d1
commit
a70860f449
@@ -85,8 +85,14 @@ typedef struct {
|
||||
// File mode bitmasks.
|
||||
//
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_RWXU 0000700u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_RUSR 0000400u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_WUSR 0000200u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_RWXG 0000070u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_RGRP 0000040u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_WGRP 0000020u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_RWXO 0000007u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_ROTH 0000004u
|
||||
#define VIRTIO_FS_FUSE_MODE_PERM_WOTH 0000002u
|
||||
|
||||
//
|
||||
// Flags for VirtioFsFuseOpOpen.
|
||||
@@ -108,6 +114,7 @@ typedef enum {
|
||||
VirtioFsFuseOpOpenDir = 27,
|
||||
VirtioFsFuseOpReleaseDir = 29,
|
||||
VirtioFsFuseOpFsyncDir = 30,
|
||||
VirtioFsFuseOpCreate = 35,
|
||||
} VIRTIO_FS_FUSE_OPCODE;
|
||||
|
||||
#pragma pack (1)
|
||||
@@ -251,6 +258,16 @@ typedef struct {
|
||||
UINT16 MapAlignment;
|
||||
UINT32 Unused[8];
|
||||
} VIRTIO_FS_FUSE_INIT_RESPONSE;
|
||||
|
||||
//
|
||||
// Header for VirtioFsFuseOpCreate.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Flags;
|
||||
UINT32 Mode;
|
||||
UINT32 Umask;
|
||||
UINT32 Padding;
|
||||
} VIRTIO_FS_FUSE_CREATE_REQUEST;
|
||||
#pragma pack ()
|
||||
|
||||
#endif // VIRTIO_FS_H_
|
||||
|
Reference in New Issue
Block a user