Forgot to commit this, thanks Jérôme!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39021 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
33d9a03d72
commit
4d476e4612
@ -18,6 +18,41 @@
|
||||
// TODO: Tests!
|
||||
|
||||
|
||||
// watch_node
|
||||
/*! \brief Subscribes a target to watch node changes on a volume.
|
||||
|
||||
Depending of \a flags the action performed by this function varies:
|
||||
- \a flags contains at least one of \c B_WATCH_NAME, \c B_WATCH_STAT,
|
||||
or \c B_WATCH_ATTR: The target is subscribed to
|
||||
watching the specified aspects of any node on the volume.
|
||||
|
||||
\param volume dev_t referring to the volume to be watched.
|
||||
\param flags Flags indicating the actions to be performed.
|
||||
\param target Messenger referring to the target. Must be valid.
|
||||
\return \c B_OK, if everything went fine, another error code otherwise.
|
||||
*/
|
||||
status_t
|
||||
watch_volume(const dev_t volume, uint32 flags, BMessenger target)
|
||||
{
|
||||
if ((flags | B_WATCH_NAME) == 0 && (flags | B_WATCH_STAT)
|
||||
&& (flags | B_WATCH_ATTR))
|
||||
return B_BAD_VALUE;
|
||||
|
||||
BMessenger::Private messengerPrivate(target);
|
||||
port_id port = messengerPrivate.Port();
|
||||
int32 token = messengerPrivate.Token();
|
||||
return _kern_start_watching(volume, (ino_t)-1, flags, port, token);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
watch_volume(const dev_t volume, uint32 flags, const BHandler *handler,
|
||||
const BLooper *looper)
|
||||
{
|
||||
return watch_volume(volume, flags, BMessenger(handler, looper));
|
||||
}
|
||||
|
||||
|
||||
// watch_node
|
||||
/*! \brief Subscribes a target to node and/or mount watching, or unsubscribes
|
||||
it from node watching.
|
||||
|
Loading…
x
Reference in New Issue
Block a user