@@ -86,9 +86,9 @@ _dmmp_getter_func_gen(dmmp_last_error_msg, struct dmmp_context, ctx,
last_err_msg, const char *);
_dmmp_array_free_func_gen(dmmp_mpath_array_free, struct dmmp_mpath,
- _dmmp_mpath_free);
+ dmmp_mpath_free);
-void _dmmp_log(struct dmmp_context *ctx, int priority, const char *file,
+void dmmp_log(struct dmmp_context *ctx, int priority, const char *file,
int line, const char *func_name, const char *format, ...)
{
va_list args;
@@ -113,7 +113,7 @@ struct dmmp_context *dmmp_context_new(void)
if (ctx == NULL)
return NULL;
- ctx->log_func = _dmmp_log_stderr;
+ ctx->log_func = dmmp_log_stderr;
ctx->log_priority = DMMP_LOG_PRIORITY_DEFAULT;
ctx->userdata = NULL;
ctx->tmo = DEFAULT_UXSOCK_TIMEOUT;
@@ -250,10 +250,10 @@ int dmmp_mpath_array_get(struct dmmp_context *ctx,
goto out;
}
- dmmp_mp = _dmmp_mpath_new();
+ dmmp_mp = dmmp_mpath_new();
_dmmp_alloc_null_check(ctx, dmmp_mp, rc, out);
(*dmmp_mps)[i] = dmmp_mp;
- _good(_dmmp_mpath_update(ctx, dmmp_mp, j_obj_map), rc, out);
+ _good(dmmp_mpath_update(ctx, dmmp_mp, j_obj_map), rc, out);
}
out:
@@ -31,7 +31,7 @@
#include "libdmmp_private.h"
#define DMMP_LOG_STRERR_ALIGN_WIDTH 80
-/* ^ Only used in _dmmp_log_stderr() for pretty log output.
+/* ^ Only used in dmmp_log_stderr() for pretty log output.
* When provided log message is less than 80 bytes, fill it with space, then
* print code file name, function name, line after the 80th bytes.
*/
@@ -62,7 +62,7 @@ static const struct _num_str_conv _DMMP_PRI_CONV[] = {
};
_dmmp_str_func_gen(dmmp_log_priority_str, int, priority, _DMMP_PRI_CONV);
-void _dmmp_log_stderr(struct dmmp_context *ctx, int priority,
+void dmmp_log_stderr(struct dmmp_context *ctx, int priority,
const char *file, int line, const char *func_name,
const char *format, va_list args)
{
@@ -44,7 +44,7 @@ _dmmp_getter_func_gen(dmmp_mpath_wwid_get, struct dmmp_mpath, dmmp_mp,
_dmmp_getter_func_gen(dmmp_mpath_kdev_name_get, struct dmmp_mpath, dmmp_mp,
kdev_name, const char *);
-struct dmmp_mpath *_dmmp_mpath_new(void)
+struct dmmp_mpath *dmmp_mpath_new(void)
{
struct dmmp_mpath *dmmp_mp = NULL;
@@ -59,7 +59,7 @@ struct dmmp_mpath *_dmmp_mpath_new(void)
return dmmp_mp;
}
-int _dmmp_mpath_update(struct dmmp_context *ctx, struct dmmp_mpath *dmmp_mp,
+int dmmp_mpath_update(struct dmmp_context *ctx, struct dmmp_mpath *dmmp_mp,
json_object *j_obj_map)
{
int rc = DMMP_OK;
@@ -113,10 +113,10 @@ int _dmmp_mpath_update(struct dmmp_context *ctx, struct dmmp_mpath *dmmp_mp,
dmmp_mp->dmmp_pgs[i] = NULL;
for (i = 0; i < dmmp_mp->dmmp_pg_count; ++i) {
- dmmp_pg = _dmmp_path_group_new();
+ dmmp_pg = dmmp_path_group_new();
_dmmp_alloc_null_check(ctx, dmmp_pg, rc, out);
dmmp_mp->dmmp_pgs[i] = dmmp_pg;
- _good(_dmmp_path_group_update(ctx, dmmp_pg,
+ _good(dmmp_path_group_update(ctx, dmmp_pg,
array_list_get_idx(ar_pgs, i)),
rc, out);
}
@@ -126,11 +126,11 @@ int _dmmp_mpath_update(struct dmmp_context *ctx, struct dmmp_mpath *dmmp_mp,
out:
if (rc != DMMP_OK)
- _dmmp_mpath_free(dmmp_mp);
+ dmmp_mpath_free(dmmp_mp);
return rc;
}
-void _dmmp_mpath_free(struct dmmp_mpath *dmmp_mp)
+void dmmp_mpath_free(struct dmmp_mpath *dmmp_mp)
{
if (dmmp_mp == NULL)
return ;
@@ -59,7 +59,7 @@ _dmmp_getter_func_gen(dmmp_path_blk_name_get, struct dmmp_path, dmmp_p,
_dmmp_getter_func_gen(dmmp_path_status_get, struct dmmp_path, dmmp_p,
status, uint32_t);
-struct dmmp_path *_dmmp_path_new(void)
+struct dmmp_path *dmmp_path_new(void)
{
struct dmmp_path *dmmp_p = NULL;
@@ -72,7 +72,7 @@ struct dmmp_path *_dmmp_path_new(void)
return dmmp_p;
}
-int _dmmp_path_update(struct dmmp_context *ctx, struct dmmp_path *dmmp_p,
+int dmmp_path_update(struct dmmp_context *ctx, struct dmmp_path *dmmp_p,
json_object *j_obj_p)
{
int rc = DMMP_OK;
@@ -102,11 +102,11 @@ int _dmmp_path_update(struct dmmp_context *ctx, struct dmmp_path *dmmp_p,
out:
if (rc != DMMP_OK)
- _dmmp_path_free(dmmp_p);
+ dmmp_path_free(dmmp_p);
return rc;
}
-void _dmmp_path_free(struct dmmp_path *dmmp_p)
+void dmmp_path_free(struct dmmp_path *dmmp_p)
{
if (dmmp_p == NULL)
return;
@@ -67,10 +67,10 @@ _dmmp_getter_func_gen(dmmp_path_group_priority_get, struct dmmp_path_group,
_dmmp_getter_func_gen(dmmp_path_group_selector_get, struct dmmp_path_group,
dmmp_pg, selector, const char *);
_dmmp_array_free_func_gen(_dmmp_path_group_array_free, struct dmmp_path_group,
- _dmmp_path_group_free);
+ dmmp_path_group_free);
-struct dmmp_path_group *_dmmp_path_group_new(void)
+struct dmmp_path_group *dmmp_path_group_new(void)
{
struct dmmp_path_group *dmmp_pg = NULL;
@@ -87,7 +87,7 @@ struct dmmp_path_group *_dmmp_path_group_new(void)
}
return dmmp_pg;
}
-int _dmmp_path_group_update(struct dmmp_context *ctx,
+int dmmp_path_group_update(struct dmmp_context *ctx,
struct dmmp_path_group *dmmp_pg,
json_object *j_obj_pg)
{
@@ -157,10 +157,10 @@ int _dmmp_path_group_update(struct dmmp_context *ctx,
dmmp_pg->dmmp_ps[i] = NULL;
for (i = 0; i < dmmp_pg->dmmp_p_count; ++i) {
- dmmp_p = _dmmp_path_new();
+ dmmp_p = dmmp_path_new();
_dmmp_alloc_null_check(ctx, dmmp_p, rc, out);
dmmp_pg->dmmp_ps[i] = dmmp_p;
- _good(_dmmp_path_update(ctx, dmmp_p,
+ _good(dmmp_path_update(ctx, dmmp_p,
array_list_get_idx(ar_ps, i)),
rc, out);
}
@@ -173,11 +173,11 @@ int _dmmp_path_group_update(struct dmmp_context *ctx,
out:
if (rc != DMMP_OK)
- _dmmp_path_group_free(dmmp_pg);
+ dmmp_path_group_free(dmmp_pg);
return rc;
}
-void _dmmp_path_group_free(struct dmmp_path_group *dmmp_pg)
+void dmmp_path_group_free(struct dmmp_path_group *dmmp_pg)
{
uint32_t i = 0;
@@ -188,7 +188,7 @@ void _dmmp_path_group_free(struct dmmp_path_group *dmmp_pg)
if (dmmp_pg->dmmp_ps != NULL) {
for (i = 0; i < dmmp_pg->dmmp_p_count; ++i) {
- _dmmp_path_free(dmmp_pg->dmmp_ps[i]);
+ dmmp_path_free(dmmp_pg->dmmp_ps[i]);
}
free(dmmp_pg->dmmp_ps);
}
@@ -110,33 +110,33 @@ do { \
DMMP_DLL_LOCAL int _dmmp_ipc_exec(struct dmmp_context *ctx, const char *cmd,
char **output);
-DMMP_DLL_LOCAL struct dmmp_mpath *_dmmp_mpath_new(void);
-DMMP_DLL_LOCAL struct dmmp_path_group *_dmmp_path_group_new(void);
-DMMP_DLL_LOCAL struct dmmp_path *_dmmp_path_new(void);
+DMMP_DLL_LOCAL struct dmmp_mpath *dmmp_mpath_new(void);
+DMMP_DLL_LOCAL struct dmmp_path_group *dmmp_path_group_new(void);
+DMMP_DLL_LOCAL struct dmmp_path *dmmp_path_new(void);
-DMMP_DLL_LOCAL int _dmmp_mpath_update(struct dmmp_context *ctx,
+DMMP_DLL_LOCAL int dmmp_mpath_update(struct dmmp_context *ctx,
struct dmmp_mpath *dmmp_mp,
json_object *j_obj_map);
-DMMP_DLL_LOCAL int _dmmp_path_group_update(struct dmmp_context *ctx,
+DMMP_DLL_LOCAL int dmmp_path_group_update(struct dmmp_context *ctx,
struct dmmp_path_group *dmmp_pg,
json_object *j_obj_pg);
-DMMP_DLL_LOCAL int _dmmp_path_update(struct dmmp_context *ctx,
+DMMP_DLL_LOCAL int dmmp_path_update(struct dmmp_context *ctx,
struct dmmp_path *dmmp_p,
json_object *j_obj_p);
-DMMP_DLL_LOCAL void _dmmp_mpath_free(struct dmmp_mpath *dmmp_mp);
-DMMP_DLL_LOCAL void _dmmp_path_group_free(struct dmmp_path_group *dmmp_pg);
+DMMP_DLL_LOCAL void dmmp_mpath_free(struct dmmp_mpath *dmmp_mp);
+DMMP_DLL_LOCAL void dmmp_path_group_free(struct dmmp_path_group *dmmp_pg);
DMMP_DLL_LOCAL void _dmmp_path_group_array_free
(struct dmmp_path_group **dmmp_pgs, uint32_t dmmp_pg_count);
-DMMP_DLL_LOCAL void _dmmp_path_free(struct dmmp_path *dmmp_p);
-DMMP_DLL_LOCAL void _dmmp_log(struct dmmp_context *ctx, int priority,
+DMMP_DLL_LOCAL void dmmp_path_free(struct dmmp_path *dmmp_p);
+DMMP_DLL_LOCAL void dmmp_log(struct dmmp_context *ctx, int priority,
const char *file, int line,
const char *func_name,
const char *format, ...)
__attribute__((format(printf, 6, 7)));
DMMP_DLL_LOCAL void _dmmp_log_err_str(struct dmmp_context *ctx, int rc);
-DMMP_DLL_LOCAL void _dmmp_log_stderr(struct dmmp_context *ctx, int priority,
+DMMP_DLL_LOCAL void dmmp_log_stderr(struct dmmp_context *ctx, int priority,
const char *file, int line,
const char *func_name, const char *format,
va_list args)
@@ -146,7 +146,7 @@ DMMP_DLL_LOCAL void _dmmp_log_stderr(struct dmmp_context *ctx, int priority,
#define _dmmp_log_cond(ctx, prio, arg...) \
do { \
if (dmmp_context_log_priority_get(ctx) >= prio) \
- _dmmp_log(ctx, prio, __FILE__, __LINE__, __FUNCTION__, \
+ dmmp_log(ctx, prio, __FILE__, __LINE__, __FUNCTION__, \
## arg); \
} while (0)
Signed-off-by: Martin Wilck <mwilck@suse.com> --- libdmmp/libdmmp.c | 10 +++++----- libdmmp/libdmmp_misc.c | 4 ++-- libdmmp/libdmmp_mp.c | 12 ++++++------ libdmmp/libdmmp_path.c | 8 ++++---- libdmmp/libdmmp_pg.c | 16 ++++++++-------- libdmmp/libdmmp_private.h | 24 ++++++++++++------------ 6 files changed, 37 insertions(+), 37 deletions(-)