DCMD_FSYS_HOOK_CTL

Control a filesystem hook

Synopsis:

#include <sys/dcmd_blk.h>

#define DCMD_FSYS_HOOK_CTL  __DIOT(_DCMD_FSYS,  30, struct fs_hookctl_s)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device.
dcmd DCMD_FSYS_HOOK_CTL
dev_data_ptr A pointer to a struct fs_hookctl_s
n_bytes sizeof(struct fs_hookctl_s)
dev_info_ptr NULL

Description:

This command controls a filesystem hook.

In order to use this command, your process needs to have the vfs/hook-control (BLK_ABILITY_HOOKCTL) custom ability enabled. For more information, see procmgr_ability() and procmgr_ability_lookup() in the C Library Reference.

Input:

The fs_hookctl_s structure is defined as follows:

/*  Cookie used to identify the VFS Hook control IOCTL
*/
#define FS_VFS_HOOK_CTL_COOKIE    (0x3A10BA57)

typedef struct fs_hookctl_s {
    uint32_t    cookie;           /* Fixed to identify the packet.              */
    uint16_t    command;          /* Command to be sent to the control.         */
    uint16_t    length;           /* Count of bytes appended to this structure. */
    uint32_t    mask;             /* Mask of hooks command should be applied to.*/
    uint8_t     reserved[8];      /* Reserved for alignment and future use.     */
    uint8_t     data[0];          /* data bytes associated with this structure. */
} fs_hookctl_t;

Output:

None.

See also:

devctl() in the QNX Neutrino C Library Reference