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

Suppress 'open failed' error messages during scanning.

This commit is contained in:
Alasdair Kergon 2005-03-03 21:54:35 +00:00
parent f3b0ea286a
commit aa70fe8b71
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.01.06 - Version 2.01.06 -
==================================== ====================================
Suppress 'open failed' error messages during scanning.
Fix default value of metadatacopies in documentation (2->1). Fix default value of metadatacopies in documentation (2->1).
Fix clvmd-gulm locking. Fix clvmd-gulm locking.
./configure --enable-debug now enables debugging code in clvmd. ./configure --enable-debug now enables debugging code in clvmd.

View File

@ -341,6 +341,9 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
#endif #endif
if ((dev->fd = open(name, flags, 0777)) < 0) { if ((dev->fd = open(name, flags, 0777)) < 0) {
if (quiet)
log_sys_debug("open", name);
else
log_sys_error("open", name); log_sys_error("open", name);
return 0; return 0;
} }

View File

@ -88,7 +88,7 @@ static int _passes_lvm_type_device_filter(struct dev_filter *f,
} }
/* Check it's accessible */ /* Check it's accessible */
if (!dev_open_flags(dev, O_RDONLY, 0, 0)) { if (!dev_open_flags(dev, O_RDONLY, 0, 1)) {
log_debug("%s: Skipping: open failed", name); log_debug("%s: Skipping: open failed", name);
return 0; return 0;
} }