Whamcloud - gitweb
LU-15522 util: make readline() static 65/46465/2
authorJohn L. Hammond <jhammond@whamcloud.com>
Sun, 6 Feb 2022 17:45:02 +0000 (11:45 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 05:34:36 +0000 (05:34 +0000)
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 <jhammond@whamcloud.com>
Change-Id: I4b90fd5d22c9fd5d193f5d18588afd3d97ca591c
Reviewed-on: https://review.whamcloud.com/46465
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/util/parser.h
libcfs/libcfs/util/parser.c

index 7827718..9ac17c4 100644 (file)
@@ -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);
index c5c8947..95de735 100644 (file)
@@ -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);