"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/device/sysdep_FREEBSD.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).

sysdep_FREEBSD.c  (monit-5.27.2):sysdep_FREEBSD.c  (monit-5.28.0)
skipping to change at line 133 skipping to change at line 133
return false; return false;
} }
buf[len] = 0; buf[len] = 0;
// Scan the table for matching label/partition // Scan the table for matching label/partition
char disk[PATH_MAX] = {}; char disk[PATH_MAX] = {};
const char *pathname = path + 5; // cut "/dev/" from the path const char *pathname = path + 5; // cut "/dev/" from the path
for (const char *cursor = buf; cursor; cursor = strchr(cursor, ' \n')) { for (const char *cursor = buf; cursor; cursor = strchr(cursor, ' \n')) {
while (*cursor == '\n') { while (*cursor == '\n') {
cursor++; cursor++;
} }
if (cursor) { if (*cursor) {
int index; int index;
char type[64] = {}; char type[64] = {};
char name[PATH_MAX] = {}; char name[PATH_MAX] = {};
if (sscanf(cursor, "%d %63s %1023s ", &index, ty pe, name) == 3) { if (sscanf(cursor, "%d %63s %1023s ", &index, ty pe, name) == 3) {
if (Str_isEqual(type, "DISK")) { if (Str_isEqual(type, "DISK")) {
snprintf(disk, sizeof(disk), "%s ", name); snprintf(disk, sizeof(disk), "%s ", name);
} else { } else {
if (Str_isEqual(pathname, name)) { if (Str_isEqual(pathname, name)) {
// Matching label/partit ion found, parse the disk // Matching label/partit ion found, parse the disk
for (size_t i = 0; disk[ i]; i++) { for (size_t i = 0; disk[ i]; i++) {
 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)