1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Only functions listed in libdevmapper.h should get exported.

This commit is contained in:
Alasdair Kergon 2002-11-14 19:26:28 +00:00
parent 40c44db720
commit 34917a5373
3 changed files with 31 additions and 6 deletions

24
libdm/.export.sym Normal file
View File

@ -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:
*;
};

View File

@ -29,7 +29,8 @@ static char _dm_dir[PATH_MAX] = DEV_DIR DM_DIR;
* Library users can provide their own logging * Library users can provide their own logging
* function. * 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; va_list ap;
@ -55,7 +56,7 @@ void dm_log_init(dm_log_fn fn)
_log = 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 there's a /, assume caller knows what they're doing */
if (strchr(dev_name, '/')) if (strchr(dev_name, '/'))

View File

@ -14,7 +14,7 @@
#define _LOG_ERR 3 #define _LOG_ERR 3
#define _LOG_FATAL 2 #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_error(msg, x...) _log(_LOG_ERR, __FILE__, __LINE__, msg, ## x)
#define log_print(msg, x...) _log(_LOG_WARN, __FILE__, __LINE__, msg, ## x) #define log_print(msg, x...) _log(_LOG_WARN, __FILE__, __LINE__, msg, ## x)
@ -22,7 +22,7 @@ extern dm_log_fn _log;
#define log_very_verbose(msg, x...) _log(_LOG_INFO, __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) #define log_debug(msg, x...) _log(_LOG_DEBUG, __FILE__, __LINE__, msg, ## x)
extern struct target *create_target(uint64_t start, struct target *create_target(uint64_t start,
uint64_t len, uint64_t len,
const char *type, const char *params); const char *type, const char *params);