⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

inotify_add_watch

Function inotify_add_watch 

Source
pub fn inotify_add_watch(
    instance_id: u64,
    inode: u64,
    path: &str,
    mask: u32,
) -> Result<i32, KernelError>
Expand description

Add a watch to an inotify instance.

Watches the inode at the given path for the specified event types. If the inode is already watched by this instance, the watch mask is updated.

§Arguments

  • instance_id - The inotify instance (from inotify_init)
  • inode - Inode number to watch
  • path - Path being watched (stored for debugging)
  • mask - Bitmask of event types to watch (IN_CREATE, IN_MODIFY, etc.)

Returns the watch descriptor (wd).