VQ_MOUNT
is part of the low-level interface between kernel and user space. I recommend avoiding it if you can.
Can you please share some documentation on
kNotifyVFSXXX
and
kNotify
, on how exactly I can get notified on smb dfs mount.
The Darwin notify API is a general-purpose system-wide notification mechanism. To learn more, read the
notify
man page.
If you look in
<notify_keys.h>
, you’ll see there are a bunch of constants for specific Darwin notifications. For example,
kNotifyVFSMount
expands to
com.apple.system.kernel.mount
. You can play around with these notifications using
NotifyTool
. To continue the above example, here’s how you’d listen for volume mounts:
$ NotifyTool listen com.apple.system.kernel.mount
Listening using a file descriptor:
On mounting a volume, you’ll see a notification posted:
$ NotifyTool listen com.apple.system.kernel.mount
Listening using a file descriptor:
com.apple.system.kernel.mount (6)
To see how that works under the covers, look at the code for
NotifyTool
itself.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"