[vhffs-dev] [1583] IN_MODIFY is used instead of IN_CLOSE_WRITE in case of truncate(2) or ftruncate(2) |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1583
Author: gradator
Date: 2010-03-29 02:05:35 +0200 (Mon, 29 Mar 2010)
Log Message:
-----------
IN_MODIFY is used instead of IN_CLOSE_WRITE in case of truncate(2) or ftruncate(2)
Modified Paths:
--------------
trunk/vhffs-fssync/vhffsfssync_master.c
Modified: trunk/vhffs-fssync/vhffsfssync_master.c
===================================================================
--- trunk/vhffs-fssync/vhffsfssync_master.c 2010-03-28 22:38:31 UTC (rev 1582)
+++ trunk/vhffs-fssync/vhffsfssync_master.c 2010-03-29 00:05:35 UTC (rev 1583)
@@ -55,8 +55,8 @@
/* -- inotify stuff -- */
#define VHFFSFSSYNC_BUF_LEN 4096
-#define VHFFSFSSYNC_WATCH_MASK IN_ATTRIB|IN_CREATE|IN_DELETE|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_DONT_FOLLOW|IN_ONLYDIR
-// Not used yet: IN_DELETE_SELF, IN_MODIFY, IN_MOVE_SELF
+#define VHFFSFSSYNC_WATCH_MASK IN_ATTRIB|IN_CREATE|IN_DELETE|IN_CLOSE_WRITE|IN_MODIFY|IN_MOVED_FROM|IN_MOVED_TO|IN_DONT_FOLLOW|IN_ONLYDIR
+// Not used yet: IN_DELETE_SELF, IN_MOVE_SELF
// Will never be used: IN_ACCESS, IN_OPEN, IN_CLOSE_NOWRITE
// each monitor entry is associated with a path, we need to keep it to compute the path
@@ -1507,8 +1507,10 @@
#if DEBUG_INOTIFY
printf("IN_MODIFY\n");
/* we can send the data here */
-// printf("==> SEND %s\n", pathname);
+ printf("==> SEND %s\n", pathname);
#endif
+ vhffsfssync_net_broadcast_file(pathname);
+
// file modified and closed
} else if( event->mask & IN_CLOSE_WRITE ) {
#if DEBUG_INOTIFY