diff --git a/libdm/.export.sym b/libdm/.export.sym new file mode 100644 index 000000000..44f18b7c8 --- /dev/null +++ b/libdm/.export.sym @@ -0,0 +1,24 @@ +{ + global: + dm_log_init; + dm_task_create; + dm_task_destroy; + dm_task_set_name; + dm_task_set_uuid; + dm_get_library_version; + dm_task_get_driver_version; + dm_task_get_info; + dm_task_get_deps; + dm_task_get_uuid; + dm_task_set_ro; + dm_task_set_newname; + dm_task_set_minor; + dm_task_add_target; + dm_get_next_target; + dm_task_run; + dm_set_dev_dir; + dm_dir; + local: + *; +}; + diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 430efb0bb..6ed3f4776 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -29,7 +29,8 @@ static char _dm_dir[PATH_MAX] = DEV_DIR DM_DIR; * Library users can provide their own logging * function. */ -void _default_log(int level, const char *file, int line, const char *f, ...) +static void _default_log(int level, const char *file, int line, + const char *f, ...) { va_list ap; @@ -55,7 +56,7 @@ void dm_log_init(dm_log_fn fn) _log = fn; } -void _build_dev_path(char *buffer, size_t len, const char *dev_name) +static void _build_dev_path(char *buffer, size_t len, const char *dev_name) { /* If there's a /, assume caller knows what they're doing */ if (strchr(dev_name, '/')) diff --git a/libdm/libdm-common.h.in b/libdm/libdm-common.h.in index 5427e7aa9..85763cb6a 100644 --- a/libdm/libdm-common.h.in +++ b/libdm/libdm-common.h.in @@ -14,7 +14,7 @@ #define _LOG_ERR 3 #define _LOG_FATAL 2 -extern dm_log_fn _log; +dm_log_fn _log; #define log_error(msg, x...) _log(_LOG_ERR, __FILE__, __LINE__, msg, ## x) #define log_print(msg, x...) _log(_LOG_WARN, __FILE__, __LINE__, msg, ## x) @@ -22,9 +22,9 @@ extern dm_log_fn _log; #define log_very_verbose(msg, x...) _log(_LOG_INFO, __FILE__, __LINE__, msg, ## x) #define log_debug(msg, x...) _log(_LOG_DEBUG, __FILE__, __LINE__, msg, ## x) -extern struct target *create_target(uint64_t start, - uint64_t len, - const char *type, const char *params); +struct target *create_target(uint64_t start, + uint64_t len, + const char *type, const char *params); int add_dev_node(const char *dev_name, dev_t dev); int rm_dev_node(const char *dev_name);