mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-11 03:33:14 +03:00
Suppress locking library load failure message if --ignorelockingfailure.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
Version 2.02.03 -
|
Version 2.02.03 -
|
||||||
===================================
|
===================================
|
||||||
|
Suppress locking library load failure message if --ignorelockingfailure.
|
||||||
Propagate partial mode around cluster.
|
Propagate partial mode around cluster.
|
||||||
Fix archive file expiration.
|
Fix archive file expiration.
|
||||||
Fix dmeventd build.
|
Fix dmeventd build.
|
||||||
|
@@ -657,7 +657,7 @@ static int _init_formats(struct cmd_context *cmd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(lib = load_shared_library(cmd->cft, cv->v.str,
|
if (!(lib = load_shared_library(cmd->cft, cv->v.str,
|
||||||
"format"))) {
|
"format", 0))) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -753,7 +753,7 @@ static int _init_segtypes(struct cmd_context *cmd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(lib = load_shared_library(cmd->cft, cv->v.str,
|
if (!(lib = load_shared_library(cmd->cft, cv->v.str,
|
||||||
"segment type"))) {
|
"segment type", 0))) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ int init_external_locking(struct locking_type *locking, struct config_tree *cft)
|
|||||||
libname = find_config_str(cft->root, "global/locking_library",
|
libname = find_config_str(cft->root, "global/locking_library",
|
||||||
DEFAULT_LOCKING_LIB);
|
DEFAULT_LOCKING_LIB);
|
||||||
|
|
||||||
if (!(_locking_lib = load_shared_library(cft, libname, "locking"))) {
|
if (!(_locking_lib = load_shared_library(cft, libname, "locking", 1))) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ void get_shared_library_path(struct config_tree *cft, const char *libname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *load_shared_library(struct config_tree *cft, const char *libname,
|
void *load_shared_library(struct config_tree *cft, const char *libname,
|
||||||
const char *desc)
|
const char *desc, int silent)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
void *library;
|
void *library;
|
||||||
@@ -47,8 +47,14 @@ void *load_shared_library(struct config_tree *cft, const char *libname,
|
|||||||
|
|
||||||
log_very_verbose("Opening shared %s library %s", desc, path);
|
log_very_verbose("Opening shared %s library %s", desc, path);
|
||||||
|
|
||||||
if (!(library = dlopen(path, RTLD_LAZY)))
|
if (!(library = dlopen(path, RTLD_LAZY))) {
|
||||||
log_error("Unable to open external %s library %s", desc, path);
|
if (silent && ignorelockingfailure())
|
||||||
|
log_verbose("Unable to open external %s library %s",
|
||||||
|
desc, path);
|
||||||
|
else
|
||||||
|
log_error("Unable to open external %s library %s",
|
||||||
|
desc, path);
|
||||||
|
}
|
||||||
|
|
||||||
return library;
|
return library;
|
||||||
}
|
}
|
||||||
|
@@ -19,4 +19,4 @@
|
|||||||
void get_shared_library_path(struct config_tree *cft, const char *libname,
|
void get_shared_library_path(struct config_tree *cft, const char *libname,
|
||||||
char *path, int path_len);
|
char *path, int path_len);
|
||||||
void *load_shared_library(struct config_tree *cf, const char *libname,
|
void *load_shared_library(struct config_tree *cf, const char *libname,
|
||||||
const char *what);
|
const char *what, int silent);
|
||||||
|
Reference in New Issue
Block a user