NodeMonitor: Added B_WATCH_CHILDREN flag.

* Added a directory argument for notify_{stat/attribute}_changed().
* This allows to watch only a directory, and get the notifications for
  all of its files, not just add/remove entry notifications.
This commit is contained in:
Axel Dörfler
2016-03-28 14:31:27 +02:00
parent 55f28f1396
commit 6f7fc2204b
31 changed files with 367 additions and 307 deletions
@@ -895,6 +895,7 @@
#define B_FS_HAS_SELF_HEALING_LINKS FSSH_B_FS_HAS_SELF_HEALING_LINKS
#define B_FS_HAS_ALIASES FSSH_B_FS_HAS_ALIASES
#define B_FS_SUPPORTS_NODE_MONITORING FSSH_B_FS_SUPPORTS_NODE_MONITORING
#define B_FS_SUPPORTS_MONITOR_CHILDREN FSSH_B_FS_SUPPORTS_MONITOR_CHILDREN
#define fs_info fssh_fs_info
+1
View File
@@ -21,6 +21,7 @@
#define FSSH_B_FS_HAS_SELF_HEALING_LINKS 0x00080000
#define FSSH_B_FS_HAS_ALIASES 0x00100000
#define FSSH_B_FS_SUPPORTS_NODE_MONITORING 0x00200000
#define FSSH_B_FS_SUPPORTS_MONITOR_CHILDREN 0x00400000
typedef struct fssh_fs_info {
fssh_dev_t dev; /* volume dev_t */
+4 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2008, Haiku Inc. All Rights Reserved.
* Copyright 2004-2016, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FSSH_FS_INTERFACE_H
@@ -395,9 +395,10 @@ extern fssh_status_t fssh_notify_entry_moved(fssh_mount_id device,
fssh_vnode_id toDirectory, const char *toName,
fssh_vnode_id node);
extern fssh_status_t fssh_notify_stat_changed(fssh_mount_id device,
fssh_vnode_id node, uint32_t statFields);
fssh_vnode_id dir, fssh_vnode_id node, uint32_t statFields);
extern fssh_status_t fssh_notify_attribute_changed(fssh_mount_id device,
fssh_vnode_id node, const char *attribute, int32_t cause);
fssh_vnode_id dir, fssh_vnode_id node, const char *attribute,
int32_t cause);
extern fssh_status_t fssh_notify_query_entry_created(fssh_port_id port,
int32_t token, fssh_mount_id device,