Print this page
3484 enhance and document tail follow support
Reviewed by: Joshua M. Clulow <jmc@joyent.com>

@@ -22,10 +22,14 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ */
+
 #ifndef _SYS_PORT_IMPL_H
 #define _SYS_PORT_IMPL_H
 
 
 #ifdef  __cplusplus

@@ -309,10 +313,11 @@
 #define FOP_FILE_SETSECATTR     0x00020000
 #define FOP_FILE_SETATTR_ATIME  0x00040000
 #define FOP_FILE_SETATTR_MTIME  0x00080000
 #define FOP_FILE_SETATTR_CTIME  0x00100000
 #define FOP_FILE_LINK_SRC       0x00200000
+#define FOP_FILE_TRUNC          0x00400000
 
 /*
  * File modification event.
  */
 #define FOP_MODIFIED_MASK       (FOP_FILE_WRITE|FOP_FILE_CREATE \

@@ -337,14 +342,19 @@
                                 |FOP_FILE_SYMLINK|FOP_FILE_SETATTR_CTIME \
                                 |FOP_FILE_LINK_SRC|FOP_FILE_SETSECATTR)
 
 
 /*
+ * File trunc event
+ */
+#define FOP_TRUNC_MASK          (FOP_FILE_TRUNC|FOP_FILE_CREATE)
+
+/*
  * valid watchable events
  */
 #define FILE_EVENTS_MASK        (FILE_ACCESS|FILE_MODIFIED|FILE_ATTRIB \
-                                |FILE_NOFOLLOW)
+                                |FILE_NOFOLLOW|FILE_TRUNC)
 /* --- End file events --- */
 
 /*
  * port_kstat_t contains the event port kernel values which are
  * exported to kstat.