Enable inotify writing for an OCB
#include <sys/dcmd_fsevmgr.h> #define DCMD_FSEVMGR_WRITER __DIOTF(_DCMD_FSEVMGR, 6, fsevmgr_chidkey_t)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening /dev/fsevents |
| dcmd | DCMD_FSEVMGR_WRITER |
| dev_data_ptr | A pointer to a fsevmgr_chidkey_t |
| n_bytes | sizeof(fsevmgr_chidkey_t) |
| dev_info_ptr | NULL |
This command enables inotify writing for an OCB.
An initialize fsevmgr_chidkey_t structure:
typedef struct fsevmgr_chidkey_s {
int32_t chid; /* Communication channel id */
uint32_t wrid; /* Writer unique id */
uint64_t key; /* Populated with a communication key */
} fsevmgr_chidkey_t;
Set chid to the channel ID of the would-be writer.
The wrid and key are set.
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference: