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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/port_impl.h
          +++ new/usr/src/uts/common/sys/port_impl.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
       27 +/*
       28 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
       29 + */
       30 +
  27   31  #ifndef _SYS_PORT_IMPL_H
  28   32  #define _SYS_PORT_IMPL_H
  29   33  
  30   34  
  31   35  #ifdef  __cplusplus
  32   36  extern "C" {
  33   37  #endif
  34   38  
  35   39  /*
  36   40   * Note:
↓ open down ↓ 267 lines elided ↑ open up ↑
 304  308  #define FOP_FILE_READDIR        0x00001000
 305  309  #define FOP_FILE_RENAMESRC      0x00002000
 306  310  #define FOP_FILE_RENAMEDST      0x00004000
 307  311  #define FOP_FILE_REMOVEFILE     0x00008000
 308  312  #define FOP_FILE_REMOVEDIR      0x00010000
 309  313  #define FOP_FILE_SETSECATTR     0x00020000
 310  314  #define FOP_FILE_SETATTR_ATIME  0x00040000
 311  315  #define FOP_FILE_SETATTR_MTIME  0x00080000
 312  316  #define FOP_FILE_SETATTR_CTIME  0x00100000
 313  317  #define FOP_FILE_LINK_SRC       0x00200000
      318 +#define FOP_FILE_TRUNC          0x00400000
 314  319  
 315  320  /*
 316  321   * File modification event.
 317  322   */
 318  323  #define FOP_MODIFIED_MASK       (FOP_FILE_WRITE|FOP_FILE_CREATE \
 319  324                                  |FOP_FILE_REMOVE|FOP_FILE_LINK \
 320  325                                  |FOP_FILE_RENAMESRC|FOP_FILE_RENAMEDST \
 321  326                                  |FOP_FILE_MKDIR|FOP_FILE_RMDIR \
 322  327                                  |FOP_FILE_SYMLINK|FOP_FILE_SETATTR_MTIME)
 323  328  
↓ open down ↓ 8 lines elided ↑ open up ↑
 332  337   */
 333  338  #define FOP_ATTRIB_MASK         (FOP_FILE_WRITE|FOP_FILE_CREATE \
 334  339                                  |FOP_FILE_REMOVE|FOP_FILE_LINK \
 335  340                                  |FOP_FILE_RENAMESRC|FOP_FILE_RENAMEDST \
 336  341                                  |FOP_FILE_MKDIR|FOP_FILE_RMDIR \
 337  342                                  |FOP_FILE_SYMLINK|FOP_FILE_SETATTR_CTIME \
 338  343                                  |FOP_FILE_LINK_SRC|FOP_FILE_SETSECATTR)
 339  344  
 340  345  
 341  346  /*
      347 + * File trunc event
      348 + */
      349 +#define FOP_TRUNC_MASK          (FOP_FILE_TRUNC|FOP_FILE_CREATE)
      350 +
      351 +/*
 342  352   * valid watchable events
 343  353   */
 344  354  #define FILE_EVENTS_MASK        (FILE_ACCESS|FILE_MODIFIED|FILE_ATTRIB \
 345      -                                |FILE_NOFOLLOW)
      355 +                                |FILE_NOFOLLOW|FILE_TRUNC)
 346  356  /* --- End file events --- */
 347  357  
 348  358  /*
 349  359   * port_kstat_t contains the event port kernel values which are
 350  360   * exported to kstat.
 351  361   * Currently only the number of active ports is exported.
 352  362   */
 353  363  typedef struct port_kstat {
 354  364          kstat_named_t   pks_ports;
 355  365  } port_kstat_t;
↓ open down ↓ 24 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX