From 739b098793c6f86929005f63eba422ebd250e38f Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Sun, 6 Feb 2022 11:45:02 -0600 Subject: [PATCH] LU-15522 util: make readline() static In libcfs/libcfs/util/parser.c make readline() static to avoid conflicting with the real readline(). Test-Parameters: trivial Signed-off-by: John L. Hammond Change-Id: I4b90fd5d22c9fd5d193f5d18588afd3d97ca591c Reviewed-on: https://review.whamcloud.com/46465 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/util/parser.h | 1 - libcfs/libcfs/util/parser.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libcfs/include/libcfs/util/parser.h b/libcfs/include/libcfs/util/parser.h index 7827718..9ac17c4 100644 --- a/libcfs/include/libcfs/util/parser.h +++ b/libcfs/include/libcfs/util/parser.h @@ -75,7 +75,6 @@ void Parser_ignore_errors(int ignore); /* Set the ignore errors flag */ void Parser_printhelp(char *); /* Detailed help routine */ void Parser_exit(int, char **); /* Shuts down command parser */ int Parser_execarg(int argc, char **argv, command_t cmds[]); -int execute_line(char * line); int Parser_list_commands(const command_t *cmdlist, char *buffer, size_t buf_size, const char *parent_cmd, int col_start, int col_num); diff --git a/libcfs/libcfs/util/parser.c b/libcfs/libcfs/util/parser.c index c5c8947..95de735 100644 --- a/libcfs/libcfs/util/parser.c +++ b/libcfs/libcfs/util/parser.c @@ -261,7 +261,7 @@ static char **command_completion(const char *text, int start, int end) #endif /* take a string and execute the function or print help */ -int execute_line(char *line) +static int execute_line(char *line) { command_t *cmd, *ambig; char *prev; @@ -335,7 +335,7 @@ static int init_input(void) #ifndef HAVE_LIBREADLINE #define add_history(s) -char *readline(char *prompt) +static char *readline(char *prompt) { int size = 2048; char *line = malloc(size); -- 1.8.3.1