--- /dev/null
+{
+ 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:
+ *;
+};
+
* 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;
_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, '/'))
#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)
#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);
%.o: %.c
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
-%.so: $(OBJECTS)
- $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) $(OBJECTS) -o $@
+%.so: $(OBJECTS) .export.sym
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
+ -Wl,--version-script,.export.sym $(OBJECTS) -o $@
%.d: %.c
set -e; \