1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

debug: change sys_error to sys_debug

These messages do not cause command error - so changing logging level
to just 'sys_debug' (so visible only with -vvvv)
This commit is contained in:
Zdenek Kabelac 2021-03-09 11:08:47 +01:00
parent 5f7a7af7f2
commit 7342ab06fc
12 changed files with 23 additions and 23 deletions

View File

@ -1352,7 +1352,7 @@ static int _process_mapper_dir(struct dm_task *dmt)
}
if (closedir(d))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return r;
}

View File

@ -382,7 +382,7 @@ static int _find_dm_name_of_device(dev_t st_rdev, char *buf, size_t buf_len)
}
if (closedir(d))
log_sys_error("closedir", _dm_dir);
log_sys_debug("closedir", _dm_dir);
return r;
}

View File

@ -119,7 +119,7 @@ int dm_is_empty_dir(const char *dir)
break;
if (closedir(d))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return dirent ? 0 : 1;
}

View File

@ -93,7 +93,7 @@ static void _rm_blks(const char *dir)
DIR *d;
if (!(d = opendir(dir))) {
log_sys_error("opendir", dir);
log_sys_debug("opendir", dir);
return;
}
@ -104,7 +104,7 @@ static void _rm_blks(const char *dir)
continue;
if (dm_snprintf(path, sizeof(path), "%s/%s", dir, name) == -1) {
log_error("Couldn't create path for %s", name);
log_debug("Couldn't create path for %s.", name);
continue;
}
@ -113,12 +113,12 @@ static void _rm_blks(const char *dir)
continue;
log_very_verbose("Removing %s", path);
if (unlink(path) < 0)
log_sys_error("unlink", path);
log_sys_debug("unlink", path);
}
}
if (closedir(d))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
}
static int _mk_link(const char *dev_dir, const char *vg_name,
@ -169,7 +169,7 @@ static int _mk_link(const char *dev_dir, const char *vg_name,
log_very_verbose("Removing %s", lvm1_group_path);
if (unlink(lvm1_group_path) < 0)
log_sys_error("unlink", lvm1_group_path);
log_sys_debug("unlink", lvm1_group_path);
}
}

View File

@ -666,7 +666,7 @@ static int _index_dev_by_vgid_and_lvid(struct device *dev)
r = 1;
out:
if (closedir(d))
log_sys_error("closedir", path);
log_sys_debug("closedir", path);
return r;
}

View File

@ -158,7 +158,7 @@ static int _get_holder_name(const char *dir, char *name, int max_size)
}
if (closedir(dr))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return r;
}

View File

@ -218,15 +218,15 @@ static int _read_devs(struct dev_set *ds, const char *dir, unsigned sysfs_depth)
if (dm_snprintf(path, sizeof(path), "%s/%s", dir,
d->d_name) < 0) {
log_error("sysfs path name too long: %s in %s",
d->d_name, dir);
log_warn("WARGNING: sysfs path name too long: %s in %s.",
d->d_name, dir);
continue;
}
/* devices have a "dev" file */
if (dm_snprintf(file, sizeof(file), "%s/dev", path) < 0) {
log_error("sysfs path name too long: %s in %s",
d->d_name, dir);
log_warn("WARGNING: sysfs path name too long: %s in %s.",
d->d_name, dir);
continue;
}
@ -242,7 +242,7 @@ static int _read_devs(struct dev_set *ds, const char *dir, unsigned sysfs_depth)
}
if (closedir(dr))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return r;
}

View File

@ -180,14 +180,14 @@ static int _is_open_in_pid(pid_t pid, const char *path)
link_buf[len] = '\0';
if (!strcmp(deleted_path, link_buf)) {
if (closedir(pid_d))
log_sys_error("closedir", path_buf);
log_sys_debug("closedir", path_buf);
return 1;
}
}
bad:
if (closedir(pid_d))
log_sys_error("closedir", path_buf);
log_sys_debug("closedir", path_buf);
return 0;
}
@ -230,13 +230,13 @@ static int _is_open(const char *path)
continue;
if (_is_open_in_pid(pid, path)) {
if (closedir(proc_d))
log_sys_error("closedir", DEFAULT_PROC_DIR);
log_sys_debug("closedir", DEFAULT_PROC_DIR);
return 1;
}
}
if (closedir(proc_d))
log_sys_error("closedir", DEFAULT_PROC_DIR);
log_sys_debug("closedir", DEFAULT_PROC_DIR);
return 0;
}

View File

@ -1346,7 +1346,7 @@ static int _process_mapper_dir(struct dm_task *dmt)
}
if (closedir(d))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return r;
}

View File

@ -380,7 +380,7 @@ static int _find_dm_name_of_device(dev_t st_rdev, char *buf, size_t buf_len)
}
if (closedir(d))
log_sys_error("closedir", _dm_dir);
log_sys_debug("closedir", _dm_dir);
return r;
}

View File

@ -118,7 +118,7 @@ int dm_is_empty_dir(const char *dir)
break;
if (closedir(d))
log_sys_error("closedir", dir);
log_sys_debug("closedir", dir);
return dirent ? 0 : 1;
}

View File

@ -3510,7 +3510,7 @@ static int _close_stray_fds(const char *command, struct custom_fds *custom_fds)
}
if (closedir(d))
log_sys_error("closedir", _fd_dir);
log_sys_debug("closedir", _fd_dir);
#endif
return 1;