autounmountd: set filter-specific flags for the EVFILT_FS filter

Set the filter-specific flags VQ_MOUNT and VQ_UNMOUNT for the
EVFILT_FS filter.

The filter-specific flags for the EVFILT_FS filter are undocumented, but
their usage can be found by looking up vfs_event_signal().

Reviewed by:	trasz
Differential Revision:	https://reviews.freebsd.org/D28975
This commit is contained in:
Robert Wing 2021-03-02 14:18:40 -09:00
parent 231633a2e9
commit ce22a792de

View File

@ -327,7 +327,7 @@ main_autounmountd(int argc, char **argv)
if (kq < 0)
log_err(1, "kqueue");
EV_SET(&event, 0, EVFILT_FS, EV_ADD | EV_CLEAR, 0, 0, NULL);
EV_SET(&event, 0, EVFILT_FS, EV_ADD | EV_CLEAR, VQ_MOUNT | VQ_UNMOUNT, 0, NULL);
error = kevent(kq, &event, 1, NULL, 0, NULL);
if (error < 0)
log_err(1, "kevent");