@@ -113,7 +113,7 @@ void tst_parse_opts(int argc, char *argv[], const option_t *user_optarg,
void (*user_help)(void));
/* lib/tst_res.c */
-const char *strttype(int ttype);
+const char *tst_strttype(int ttype);
void tst_resm_(const char *file, const int lineno, int ttype,
const char *arg_fmt, ...)
@@ -222,6 +222,10 @@ extern void *TST_RET_PTR;
*/
const char *tst_strerrno(int err);
const char *tst_strsig(int sig);
+
+// Function to convert ttype to its name.
+const char *tst_strttype(int ttype);
+
/*
* Returns string describing status as returned by wait().
*
@@ -139,7 +139,7 @@ struct pair {
return pair_arr[idx].name; \
} while (0)
-const char *strttype(int ttype)
+const char *tst_strttype(int ttype)
{
static const struct pair ttype_pairs[] = {
PAIR(TPASS)
@@ -296,7 +296,7 @@ static void tst_print(const char *tcid, int tnum, int ttype, const char *tmesg)
/*
* Build the result line and print it.
*/
- type = strttype(ttype);
+ type = tst_strttype(ttype);
if (T_mode == VERBOSE) {
size += snprintf(message + size, sizeof(message) - size,
Rename strttype() to tst_strttype() and introduce the function for old and new library. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- include/old/test.h | 2 +- include/tst_test.h | 4 ++++ lib/tst_res.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-)