DCMD_FSEVMGR_FILTER_ADD

Add or update an inotify watch

Synopsis:

#include <sys/dcmd_fsevmgr.h>

#define DCMD_FSEVMGR_FILTER_ADD   __DIOTF(_DCMD_FSEVMGR, 3, fsevmgr_watch_add_t)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by calling inotify_init()
dcmd DCMD_FSEVMGR_FILTER_ADD
dev_data_ptr A pointer to a fsevmgr_watch_add_t
n_bytes sizeof(fsevmgr_watch_add_t)
dev_info_ptr NULL

Description:

This command adds a watch on a file descriptor. You should call inotify_add_watch() instead of using this command directly.

Input:

A filled-in fsevmgr_watch_add_t structure:

typedef struct fsevmgr_watch_add_s {
        int32_t wd;
        uint32_t mask;
        int fd;
} fsevmgr_watch_add_t;

The members include:

wd
The watch descriptor, which you can use to remove the watch. You should initialize this member to 0.
mask
A bitwise OR of the IN_* flags defined in <inotify.h>; for more information, see inotify_add_watch() in the C Library Reference.
fd
A file descriptor for the path that you want to watch.

Output:

On success, the watch descriptor is stored in the wd member.

See also:

DCMD_FSEVMGR_FILTER_REM

devctl(), inotify_add_watch(), inotify_init(), inotify_rm_watch() in the QNX Neutrino C Library Reference

fsevmgr in the Utilities Reference