]> sourceware.org Git - lvm2.git/commitdiff
debug: change sys_error to sys_debug
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Mar 2021 10:08:47 +0000 (11:08 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 10 Mar 2021 00:11:52 +0000 (01:11 +0100)
These messages do not cause command error - so changing logging level
to just 'sys_debug' (so visible only with -vvvv)

12 files changed:
device_mapper/ioctl/libdm-iface.c
device_mapper/libdm-common.c
device_mapper/libdm-file.c
lib/activate/fs.c
lib/device/dev-cache.c
lib/filters/filter-mpath.c
lib/filters/filter-sysfs.c
libdm/dm-tools/dmfilemapd.c
libdm/ioctl/libdm-iface.c
libdm/libdm-common.c
libdm/libdm-file.c
tools/lvmcmdline.c

index 6b3818e3a6bfbdb806aa4edd99bcaa8de98fc5df..536e4b23884ae64cb2a5a344edf7a5ecf4d16933 100644 (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;
 }
index 9b87e4e744e363a96624d28bbc3818eb7d0d6a5b..a2304b6031fee91144f5d0a0c5b807475a0d7666 100644 (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;
 }
index 94ca146f1e364eed9280d3157faba78f7e9d5e5c..74d9968dfad5a5c8ab2b59c06a80775f125ee4b0 100644 (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;
 }
index 2e8098ddfd4bf400f66f403646a46606936aedfa..60ced8fb56b278cee7143a1b0d789252aec3f592 100644 (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);
                }
        }
 
index cf6334564abdc61810d223bafbed63ec28da6eac..6cf798858e6c6216a7c3e39300494ec305f49fdd 100644 (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;
 }
index 2022964585b2bb11f86bb5a0eda90a59e191d97d..57ed79908b9ee176dc9856da5aaec389ea0e42b6 100644 (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;
 }
index b2ac63d7b752463116acd9e8f4d55bc4fd322c26..b626144b25ad5c975748519a1fd0ca1a9af1139b 100644 (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;
 }
index 856df3df2dbc02417e726b1ffe8c1a8d37bba429..e15f0015fdb15616e2972b213b30993de28342e5 100644 (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;
 }
index f4be478da4e9f1762860cbfcecb295c50c851b74..f35ddeb0724f811c9d46ebbf71ca87dbf46b6237 100644 (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;
 }
index a28829765a1b58767aae7b5c6ec42ee302a68c39..f2ea64905fdab3fa5c97d49be24103a91c13d8ae 100644 (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;
 }
index 290ad3234b18069ef9bfc17b1ebb387e4fb27e77..2e5f14f6fd959cc3208c27ae490f5c96e2925ff7 100644 (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;
 }
index 588c78d729ac74ec23a1a08e30a33e07878adfdb..796ecfa780a8c049c4691992baf87d330f87933c 100644 (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;
This page took 0.062896 seconds and 5 git commands to generate.