diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-10-15 16:21:01 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-10-15 17:49:44 +0200 |
commit | 70950bbd977020593b19ac704fd7571b4b2826cd (patch) | |
tree | 39450e5d8de0a9d0af92b34acfc1e334811cecfa | |
parent | f1ac130dc10ba22eaafd31e906b347a12b8cea16 (diff) | |
download | lvm2-70950bbd977020593b19ac704fd7571b4b2826cd.tar.gz |
cov: log failing unlink
-rw-r--r-- | tools/pvscan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c index 6e80e3c8c..613a4c45d 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -225,7 +225,8 @@ static void _online_pvid_file_remove_devno(int major, int minor) if (!strncmp(buf, buf_in, strlen(buf))) { log_debug("Unlink pv online %s %s", buf, path); - unlink(path); + if (unlink(path)) + log_sys_debug("unlink", path); break; } } @@ -248,7 +249,8 @@ static void _online_pvid_files_remove(void) memset(path, 0, sizeof(path)); snprintf(path, sizeof(path), "%s/%s", _pvs_online_dir, de->d_name); - unlink(path); + if (unlink(path)) + log_sys_debug("unlink", path); } if (closedir(dir)) log_sys_debug("closedir", _pvs_online_dir); |