[BACK]Return to server.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdistd

Diff for /src/usr.bin/rdistd/server.c between version 1.36 and 1.37

version 1.36, 2015/01/21 03:18:31 version 1.37, 2015/01/21 04:08:37
Line 546 
Line 546 
 /*  /*
  * Query. Check to see if file exists. Return one of the following:   * Query. Check to see if file exists. Return one of the following:
  *   *
 #ifdef NFS_CHECK  
  *  QC_ONNFS            - resides on a NFS   *  QC_ONNFS            - resides on a NFS
 #endif NFS_CHECK  
 #ifdef RO_CHECK  
  *  QC_ONRO             - resides on a Read-Only filesystem   *  QC_ONRO             - resides on a Read-Only filesystem
 #endif RO_CHECK  
  *  QC_NO               - doesn't exist   *  QC_NO               - doesn't exist
  *  QC_YESsize mtime    - exists and its a regular file (size & mtime of file)   *  QC_YESsize mtime    - exists and its a regular file (size & mtime of file)
  *  QC_YES              - exists and its a directory or symbolic link   *  QC_YES              - exists and its a directory or symbolic link
Line 572 
Line 568 
         if (catname && cattarget(name) < 0)          if (catname && cattarget(name) < 0)
                 return;                  return;
   
 #if     defined(NFS_CHECK)  
         if (IS_ON(options, DO_CHKNFS)) {          if (IS_ON(options, DO_CHKNFS)) {
                 s = is_nfs_mounted(target, &stb, &stbvalid);                  s = is_nfs_mounted(target, &stb, &stbvalid);
                 if (s > 0)                  if (s > 0)
Line 585 
Line 580 
                         return;                          return;
                 }                  }
         }          }
 #endif  /* NFS_CHECK */  
   
 #if     defined(RO_CHECK)  
         if (IS_ON(options, DO_CHKREADONLY)) {          if (IS_ON(options, DO_CHKREADONLY)) {
                 s = is_ro_mounted(target, &stb, &stbvalid);                  s = is_ro_mounted(target, &stb, &stbvalid);
                 if (s > 0)                  if (s > 0)
Line 600 
Line 593 
                         return;                          return;
                 }                  }
         }          }
 #endif  /* RO_CHECK */  
   
         if (IS_ON(options, DO_CHKSYM)) {          if (IS_ON(options, DO_CHKSYM)) {
                 if (is_symlinked(target, &stb, &stbvalid) > 0) {                  if (is_symlinked(target, &stb, &stbvalid) > 0) {
Line 610 
Line 602 
         }          }
   
         /*          /*
          * If stbvalid is false, "stb" is not valid because:           * If stbvalid is false, "stb" is not valid because the stat()
          *      a) RO_CHECK and NFS_CHECK were not defined           * by is_*_mounted() either failed or does not match "target".
          *      b) The stat by is_*_mounted() either failed or  
          *         does not match "target".  
          */           */
         if (!stbvalid && lstat(target, &stb) < 0) {          if (!stbvalid && lstat(target, &stb) < 0) {
                 if (errno == ENOENT)                  if (errno == ENOENT)

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37