Skip to content

Commit

Permalink
implement 'clear' command in interface/bridge mode
Browse files Browse the repository at this point in the history
resolves warning: unused function 'int_clear' [-Wunused-function]
  • Loading branch information
stspdotname committed Oct 29, 2024
1 parent 172f4d2 commit d3156eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,7 @@ static char unsetenvhelp[];
static char saveenvhelp[];
static char verbosehelp[];
static char editinghelp[];
static char clearhelp[];
static char shellhelp[];
static char manhelp[];
static char interfacehelp[];
Expand Down Expand Up @@ -1233,6 +1234,7 @@ struct intlist Intlist[] = {
{ "who", whohelp, CMPL0 0, 0, int_who, 0 },
{ "verbose", verbosehelp, CMPL0 0, 0, int_doverbose, 1 },
{ "editing", editinghelp, CMPL0 0, 0, int_doediting, 1 },
{ "clear", clearhelp, CMPL0 0, 0, int_clear, 0 },
{ "!", shellhelp, CMPL0 0, 0, int_shell, 0 },
{ "?", "Options", CMPL0 0, 0, int_help, 0 },
{ "manual", manhelp, CMPL(H) (char **)mantab, sizeof(struct ghs), int_manual, 0 },
Expand Down Expand Up @@ -1288,6 +1290,7 @@ struct intlist Bridgelist[] = {
{ "who", whohelp, CMPL0 0, 0, int_who, 0 },
{ "verbose", verbosehelp, CMPL0 0, 0, int_doverbose, 1 },
{ "editing", editinghelp, CMPL0 0, 0, int_doediting, 1 },
{ "clear", clearhelp, CMPL0 0, 0, int_clear, 0 },
{ "!", shellhelp, CMPL0 0, 0, int_shell, 0 },

/* Help commands */
Expand Down Expand Up @@ -1811,6 +1814,12 @@ int_shell(char *ifname, int ifs, int argc, char **argv)
return 1; /* this is to allow for pasting configs with "!" separators */
}

static int
int_clear(void)
{
clear();
}

static int
int_help(void)
{
Expand Down

0 comments on commit d3156eb

Please sign in to comment.