1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-20 18:09:23 +03:00

tweak .so loading messages; extra device_exists() sanity check

This commit is contained in:
Alasdair Kergon 2006-04-28 14:08:04 +00:00
parent e24e713001
commit dfb5da937e

View File

@ -318,7 +318,7 @@ static int device_exists(char *device)
struct stat st_buf;
char path2[PATH_MAX];
if (!device)
if (!device || !*device)
return 0;
if (device[0] == '/') /* absolute path */
@ -718,8 +718,11 @@ static struct dso_data *load_dso(struct message_data *data)
void *dl;
struct dso_data *ret = NULL;
log_very_verbose("Opening shared library %s", data->dso_name);
if (!(dl = dlopen(data->dso_name, RTLD_NOW))){
log_error("%s\n", dlerror());
log_error("dmeventd %s dlopen failed: %s", data->dso_name,
dlerror());
return NULL;
}