"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libmonit/src/io/File.c" between
monit-5.27.2.tar.gz and monit-5.28.0.tar.gz

About: Monit is a utility for managing and monitoring processes, files, directories and filesystems (with automatic error recovery).

File.c  (monit-5.27.2):File.c  (monit-5.28.0)
skipping to change at line 190 skipping to change at line 190
return -1; return -1;
} }
bool File_chmod(const char *file, mode_t mode) { bool File_chmod(const char *file, mode_t mode) {
if (file) if (file)
return (chmod(file, mode) == 0); return (chmod(file, mode) == 0);
errno = EINVAL; errno = EINVAL;
return false; return false;
} }
mode_t File_mod(const char *file) { int File_mod(const char *file) {
if (file) { if (file) {
struct stat buf; struct stat buf;
if (stat(file, &buf) == 0) if (stat(file, &buf) == 0)
return buf.st_mode; return buf.st_mode;
} }
return -1; return -1;
} }
mode_t File_umask(void) { int File_umask(void) {
mode_t omask = umask(0); mode_t omask = umask(0);
umask(omask); umask(omask);
return omask; return omask;
} }
mode_t File_setUmask(mode_t mask) { mode_t File_setUmask(mode_t mask) {
mode_t omask = umask(mask); mode_t omask = umask(mask);
return omask; return omask;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)