@@ -458,7 +458,7 @@ void foreign_path_layout(fieldwidth_t *width)
vec = fgn->get_paths(fgn->context);
if (vec != NULL) {
- _get_path_layout(vec, LAYOUT_RESET_NOT, width);
+ get_path_layout__(vec, LAYOUT_RESET_NOT, width);
}
fgn->release_paths(fgn->context, vec);
@@ -489,7 +489,7 @@ void foreign_multipath_layout(fieldwidth_t *width)
vec = fgn->get_multipaths(fgn->context);
if (vec != NULL) {
- _get_multipath_layout(vec, LAYOUT_RESET_NOT, width);
+ get_multipath_layout__(vec, LAYOUT_RESET_NOT, width);
}
fgn->release_multipaths(fgn->context, vec);
@@ -517,7 +517,7 @@ static int snprint_foreign_topology__(struct strbuf *buf, int verbosity,
vec = fgn->get_multipaths(fgn->context);
if (vec != NULL) {
vector_foreach_slot(vec, gm, j) {
- if (_snprint_multipath_topology(
+ if (snprint_multipath_topology__(
gm, buf, verbosity, width) < 0)
break;
}
@@ -566,7 +566,7 @@ void print_foreign_topology(int verbosity)
fgn->lock(fgn->context);
pthread_cleanup_push(fgn->unlock, fgn->context);
vec = fgn->get_paths(fgn->context);
- _get_multipath_layout(vec, LAYOUT_RESET_NOT, width);
+ get_multipath_layout__(vec, LAYOUT_RESET_NOT, width);
fgn->release_paths(fgn->context, vec);
pthread_cleanup_pop(1);
}
@@ -600,7 +600,7 @@ int snprint_foreign_paths(struct strbuf *buf, const char *style,
vec = fgn->get_paths(fgn->context);
if (vec != NULL) {
vector_foreach_slot(vec, gp, j) {
- ret = _snprint_path(gp, buf, style, width);
+ ret = snprint_path__(gp, buf, style, width);
if (ret < 0)
break;
}
@@ -640,7 +640,7 @@ int snprint_foreign_multipaths(struct strbuf *buf, const char *style,
vec = fgn->get_multipaths(fgn->context);
if (vec != NULL) {
vector_foreach_slot(vec, gm, j) {
- ret = _snprint_multipath(gm, buf,
+ ret = snprint_multipath__(gm, buf,
style, width);
if (ret < 0)
break;
@@ -271,7 +271,7 @@ void foreign_multipath_layout(fieldwidth_t *width);
* '\0' - terminated.
* @param buf: output buffer
* @param verbosity: verbosity level
- * @param width: an array of field widths, initialized by _get_path_layout()
+ * @param width: an array of field widths, initialized by get_path_layout__()
* @returns: number of printed characters excluding trailing '\0'.
*/
int snprint_foreign_topology(struct strbuf *buf, int verbosity,
@@ -149,7 +149,7 @@ global:
path_offline;
print_all_paths;
print_foreign_topology;
- _print_multipath_topology;
+ print_multipath_topology__;
reinstate_paths;
remember_wwid;
remove_feature;
@@ -179,12 +179,12 @@ global:
snprint_foreign_multipaths;
snprint_foreign_paths;
snprint_foreign_topology;
- _snprint_multipath;
+ snprint_multipath__;
snprint_multipath_header;
snprint_multipath_map_json;
- _snprint_multipath_topology;
+ snprint_multipath_topology__;
snprint_multipath_topology_json;
- _snprint_path;
+ snprint_path__;
snprint_path_header;
snprint_status;
snprint_wildcards;
@@ -924,7 +924,7 @@ void get_path_layout(vector pathvec, int header, fieldwidth_t *width)
{
vector gpvec = vector_convert(NULL, pathvec, struct path,
dm_path_to_gen);
- _get_path_layout(gpvec,
+ get_path_layout__(gpvec,
header ? LAYOUT_RESET_HEADER : LAYOUT_RESET_ZERO,
width);
vector_free(gpvec);
@@ -946,7 +946,7 @@ reset_width(fieldwidth_t *width, enum layout_reset reset, const char *header)
}
}
-void _get_path_layout (const struct _vector *gpvec, enum layout_reset reset,
+void get_path_layout__ (const struct _vector *gpvec, enum layout_reset reset,
fieldwidth_t *width)
{
unsigned int i, j;
@@ -980,14 +980,14 @@ fieldwidth_t *alloc_multipath_layout(void) {
void get_multipath_layout (vector mpvec, int header, fieldwidth_t *width) {
vector gmvec = vector_convert(NULL, mpvec, struct multipath,
dm_multipath_to_gen);
- _get_multipath_layout(gmvec,
+ get_multipath_layout__(gmvec,
header ? LAYOUT_RESET_HEADER : LAYOUT_RESET_ZERO,
width);
vector_free(gmvec);
}
void
-_get_multipath_layout (const struct _vector *gmvec, enum layout_reset reset,
+get_multipath_layout__ (const struct _vector *gmvec, enum layout_reset reset,
fieldwidth_t *width)
{
unsigned int i, j;
@@ -1110,7 +1110,7 @@ int snprint_multipath_header(struct strbuf *line, const char *format,
return get_strbuf_len(line) - initial_len;
}
-int _snprint_multipath(const struct gen_multipath *gmp,
+int snprint_multipath__(const struct gen_multipath *gmp,
struct strbuf *line, const char *format,
const fieldwidth_t *width)
{
@@ -1171,7 +1171,7 @@ int snprint_path_header(struct strbuf *line, const char *format,
return get_strbuf_len(line) - initial_len;
}
-int _snprint_path(const struct gen_path *gp, struct strbuf *line,
+int snprint_path__(const struct gen_path *gp, struct strbuf *line,
const char *format, const fieldwidth_t *width)
{
int initial_len = get_strbuf_len(line);
@@ -1200,7 +1200,7 @@ int _snprint_path(const struct gen_path *gp, struct strbuf *line,
return get_strbuf_len(line) - initial_len;
}
-int _snprint_pathgroup(const struct gen_pathgroup *ggp, struct strbuf *line,
+int snprint_pathgroup__(const struct gen_pathgroup *ggp, struct strbuf *line,
const char *format)
{
int initial_len = get_strbuf_len(line);
@@ -1223,9 +1223,9 @@ int _snprint_pathgroup(const struct gen_pathgroup *ggp, struct strbuf *line,
}
#define snprint_pathgroup(line, fmt, pgp) \
- _snprint_pathgroup(dm_pathgroup_to_gen(pgp), line, fmt)
+ snprint_pathgroup__(dm_pathgroup_to_gen(pgp), line, fmt)
-void _print_multipath_topology(const struct gen_multipath *gmp, int verbosity)
+void print_multipath_topology__(const struct gen_multipath *gmp, int verbosity)
{
STRBUF_ON_STACK(buff);
fieldwidth_t *p_width __attribute__((cleanup(cleanup_ucharp))) = NULL;
@@ -1241,13 +1241,13 @@ void _print_multipath_topology(const struct gen_multipath *gmp, int verbosity)
pathvec = gpg->ops->get_paths(gpg);
if (pathvec == NULL)
continue;
- _get_path_layout(pathvec, LAYOUT_RESET_NOT, p_width);
+ get_path_layout__(pathvec, LAYOUT_RESET_NOT, p_width);
gpg->ops->rel_paths(gpg, pathvec);
}
gmp->ops->rel_pathgroups(gmp, pgvec);
}
- _snprint_multipath_topology(gmp, &buff, verbosity, p_width);
+ snprint_multipath_topology__(gmp, &buff, verbosity, p_width);
printf("%s", get_strbuf_str(&buff));
}
@@ -1266,7 +1266,7 @@ int snprint_multipath_style(const struct gen_multipath *gmp,
need_wwid ? " (%w)" : "", " %d %s");
}
-int _snprint_multipath_topology(const struct gen_multipath *gmp,
+int snprint_multipath_topology__(const struct gen_multipath *gmp,
struct strbuf *buff, int verbosity,
const fieldwidth_t *p_width)
{
@@ -1284,7 +1284,7 @@ int _snprint_multipath_topology(const struct gen_multipath *gmp,
return -ENOMEM;
if (verbosity == 1)
- return _snprint_multipath(gmp, buff, "%n", width);
+ return snprint_multipath__(gmp, buff, "%n", width);
if(isatty(1) &&
(rc = print_strbuf(&style, "%c[%dm", 0x1B, 1)) < 0) /* bold on */
@@ -1295,8 +1295,8 @@ int _snprint_multipath_topology(const struct gen_multipath *gmp,
(rc = print_strbuf(&style, "%c[%dm", 0x1B, 0)) < 0) /* bold off */
return rc;
- if ((rc = _snprint_multipath(gmp, buff, get_strbuf_str(&style), width)) < 0
- || (rc = _snprint_multipath(gmp, buff, PRINT_MAP_PROPS, width)) < 0)
+ if ((rc = snprint_multipath__(gmp, buff, get_strbuf_str(&style), width)) < 0
+ || (rc = snprint_multipath__(gmp, buff, PRINT_MAP_PROPS, width)) < 0)
return rc;
pgvec = gmp->ops->get_pathgroups(gmp);
@@ -1310,7 +1310,7 @@ int _snprint_multipath_topology(const struct gen_multipath *gmp,
if ((rc = print_strbuf(buff, "%c-+- ",
last_group ? '`' : '|')) < 0 ||
- (rc = _snprint_pathgroup(gpg, buff, PRINT_PG_INDENT)) < 0)
+ (rc = snprint_pathgroup__(gpg, buff, PRINT_PG_INDENT)) < 0)
return rc;
pathvec = gpg->ops->get_paths(gpg);
@@ -1322,7 +1322,7 @@ int _snprint_multipath_topology(const struct gen_multipath *gmp,
last_group ? ' ' : '|',
i + 1 == VECTOR_SIZE(pathvec) ?
'`': '|')) < 0 ||
- (rc = _snprint_path(gp, buff,
+ (rc = snprint_path__(gp, buff,
PRINT_PATH_INDENT, p_width)) < 0)
return rc;
}
@@ -17,28 +17,28 @@ enum layout_reset {
/* fieldwidth_t is defined in generic.h */
fieldwidth_t *alloc_path_layout(void);
-void _get_path_layout (const struct _vector *gpvec, enum layout_reset,
+void get_path_layout__ (const struct _vector *gpvec, enum layout_reset,
fieldwidth_t *width);
void get_path_layout (vector pathvec, int header, fieldwidth_t *width);
fieldwidth_t *alloc_multipath_layout(void);
-void _get_multipath_layout (const struct _vector *gmvec, enum layout_reset,
+void get_multipath_layout__ (const struct _vector *gmvec, enum layout_reset,
fieldwidth_t *width);
void get_multipath_layout (vector mpvec, int header, fieldwidth_t *width);
int snprint_path_header(struct strbuf *, const char *, const fieldwidth_t *);
int snprint_multipath_header(struct strbuf *, const char *,
const fieldwidth_t *);
-int _snprint_path (const struct gen_path *, struct strbuf *, const char *,
+int snprint_path__ (const struct gen_path *, struct strbuf *, const char *,
const fieldwidth_t *);
#define snprint_path(buf, fmt, pp, w) \
- _snprint_path(dm_path_to_gen(pp), buf, fmt, w)
-int _snprint_multipath (const struct gen_multipath *, struct strbuf *,
+ snprint_path__(dm_path_to_gen(pp), buf, fmt, w)
+int snprint_multipath__ (const struct gen_multipath *, struct strbuf *,
const char *, const fieldwidth_t *);
#define snprint_multipath(buf, fmt, mp, w) \
- _snprint_multipath(dm_multipath_to_gen(mp), buf, fmt, w)
-int _snprint_multipath_topology (const struct gen_multipath *, struct strbuf *,
+ snprint_multipath__(dm_multipath_to_gen(mp), buf, fmt, w)
+int snprint_multipath_topology__ (const struct gen_multipath *, struct strbuf *,
int verbosity, const fieldwidth_t *);
#define snprint_multipath_topology(buf, mpp, v, w) \
- _snprint_multipath_topology (dm_multipath_to_gen(mpp), buf, v, w)
+ snprint_multipath_topology__ (dm_multipath_to_gen(mpp), buf, v, w)
int snprint_multipath_topology_json(struct strbuf *, const struct vectors *vecs);
int snprint_config__(const struct config *conf, struct strbuf *buff,
const struct _vector *hwtable, const struct _vector *mpvec);
@@ -58,10 +58,10 @@ int snprint_tgt_wwpn(struct strbuf *, const struct path *);
#define PROTOCOL_BUF_SIZE sizeof("scsi:unspec")
int snprint_path_protocol(struct strbuf *, const struct path *);
-void _print_multipath_topology (const struct gen_multipath * gmp,
+void print_multipath_topology__ (const struct gen_multipath * gmp,
int verbosity);
#define print_multipath_topology(mpp, v) \
- _print_multipath_topology(dm_multipath_to_gen(mpp), v)
+ print_multipath_topology__(dm_multipath_to_gen(mpp), v)
void print_all_paths (vector pathvec, int banner);
Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/foreign.c | 12 +++++------ libmultipath/foreign.h | 2 +- libmultipath/libmultipath.version | 8 ++++---- libmultipath/print.c | 34 +++++++++++++++---------------- libmultipath/print.h | 20 +++++++++--------- 5 files changed, 38 insertions(+), 38 deletions(-)