"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/device/device_common.c" between
monit-5.25.3.tar.gz and monit-5.26.0.tar.gz

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

device_common.c  (monit-5.25.3):device_common.c  (monit-5.26.0)
skipping to change at line 108 skipping to change at line 108
} else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { } else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) {
// Block or character device // Block or character device
rv = Filesystem_getByDevice(&(s->inf), buf); rv = Filesystem_getByDevice(&(s->inf), buf);
} }
} }
} }
if (rv) { if (rv) {
s->inf.filesystem->mode = sb.st_mode; s->inf.filesystem->mode = sb.st_mode;
s->inf.filesystem->uid = sb.st_uid; s->inf.filesystem->uid = sb.st_uid;
s->inf.filesystem->gid = sb.st_gid; s->inf.filesystem->gid = sb.st_gid;
s->inf.filesystem->f_filesused = s->inf.filesystem->f_files - s- >inf.filesystem->f_filesfree; s->inf.filesystem->f_filesused = s->inf.filesystem->f_filesfree > 0 ? s->inf.filesystem->f_files - s->inf.filesystem->f_filesfree : s->inf.files ystem->f_files;
s->inf.filesystem->f_blocksused = s->inf.filesystem->f_blocks - s->inf.filesystem->f_blocksfreetotal; s->inf.filesystem->f_blocksused = s->inf.filesystem->f_blocks - s->inf.filesystem->f_blocksfreetotal;
s->inf.filesystem->inode_percent = s->inf.filesystem->f_files > 0 ? 100. * (double)s->inf.filesystem->f_filesused / (double)s->inf.filesystem->f _files : 0.; s->inf.filesystem->inode_percent = s->inf.filesystem->f_files > 0 ? 100. * (double)s->inf.filesystem->f_filesused / (double)s->inf.filesystem->f _files : 0.;
s->inf.filesystem->space_percent = s->inf.filesystem->f_blocks > 0 ? 100. * (double)s->inf.filesystem->f_blocksused / (double)s->inf.filesystem- >f_blocks : 0.; s->inf.filesystem->space_percent = s->inf.filesystem->f_blocks > 0 ? 100. * (double)s->inf.filesystem->f_blocksused / (double)s->inf.filesystem- >f_blocks : 0.;
} else { } else {
Statistics_reset(&(s->inf.filesystem->read.bytes)); Statistics_reset(&(s->inf.filesystem->read.bytes));
Statistics_reset(&(s->inf.filesystem->read.operations)); Statistics_reset(&(s->inf.filesystem->read.operations));
Statistics_reset(&(s->inf.filesystem->write.bytes)); Statistics_reset(&(s->inf.filesystem->write.bytes));
Statistics_reset(&(s->inf.filesystem->write.operations)); Statistics_reset(&(s->inf.filesystem->write.operations));
Statistics_reset(&(s->inf.filesystem->time.read)); Statistics_reset(&(s->inf.filesystem->time.read));
Statistics_reset(&(s->inf.filesystem->time.write)); Statistics_reset(&(s->inf.filesystem->time.write));
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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