/[monit]/monit/files.c
ViewVC logotype

Diff of /monit/files.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by chopp, Mon Aug 26 16:28:39 2002 UTC revision 1.6 by hauk, Fri Sep 6 18:13:37 2002 UTC
# Line 213  int is_rcfile_changed() { Line 213  int is_rcfile_changed() {
213    return FALSE;    return FALSE;
214        
215  }  }
216    
217    
218    /**
219     * Get a files last modified timestamp. This function returns the max
220     * of either st_mtime or st_ctime. If the file does not exist or is
221     * not a regular file FALSE is returned
222     * @param file A file to stat
223     * @return last modification time or FALSE if not found or not a regular file
224    */
225    time_t file_changedtime(char *file) {
226      
227      struct stat buf;
228    
229      if(!stat(file, &buf))
230          if(S_ISREG(buf.st_mode))
231              return MAXIMUM(buf.st_mtime, buf.st_ctime);
232      
233      return FALSE;
234    
235    }
236    
237    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26