summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasso <hasso>2004-08-25 12:22:00 +0000
committerhasso <hasso>2004-08-25 12:22:00 +0000
commitb094d2603158f9d514404941c9fad04dd9b7d42c (patch)
tree9920c2f047a0f510221dda2c1eb9b9f2b2303aca
parentccb59b11047c71430eb55ed58eda94865bab20c8 (diff)
Cleaning up whitespace mess mostly caused by my patches. Bigger
reorganization of this spagetti will follow soon.
-rw-r--r--vtysh/vtysh.c134
-rw-r--r--vtysh/vtysh_config.c12
-rw-r--r--vtysh/vtysh_main.c12
3 files changed, 79 insertions, 79 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 9729d2ed..169466ea 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -45,7 +45,7 @@ struct vtysh_client
{
int fd;
} vtysh_client[VTYSH_INDEX_MAX];
-
+
/* When '^Z' is received from vty, move down to the enable mode. */
int
vtysh_end ()
@@ -94,24 +94,24 @@ DEFUNSH (VTYSH_ALL,
}
DEFUNSH (VTYSH_ALL,
- vtysh_log_file,
- vtysh_log_file_cmd,
- "log file FILENAME",
- "Logging control\n"
- "Logging to file\n"
- "Logging filename\n")
+ vtysh_log_file,
+ vtysh_log_file_cmd,
+ "log file FILENAME",
+ "Logging control\n"
+ "Logging to file\n"
+ "Logging filename\n")
{
return CMD_SUCCESS;
}
DEFUNSH (VTYSH_ALL,
- no_vtysh_log_file,
- no_vtysh_log_file_cmd,
- "no log file [FILENAME]",
- NO_STR
- "Logging control\n"
- "Cancel logging to file\n"
- "Logging file name\n")
+ no_vtysh_log_file,
+ no_vtysh_log_file_cmd,
+ "no log file [FILENAME]",
+ NO_STR
+ "Logging control\n"
+ "Cancel logging to file\n"
+ "Logging file name\n")
{
return CMD_SUCCESS;
}
@@ -421,14 +421,14 @@ vtysh_execute_func (char *line, int pager)
if (cmd_stat != CMD_WARNING)
cmd_stat = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_BGP],
line, fp);
- if (cmd_stat != CMD_WARNING)
- cmd_stat = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS], line, fp);
+ if (cmd_stat != CMD_WARNING)
+ cmd_stat = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS], line, fp);
if (cmd_stat)
{
- line = "end";
- vline = cmd_make_strvec (line);
+ line = "end";
+ vline = cmd_make_strvec (line);
- if (vline == NULL)
+ if (vline == NULL)
{
if (pager && vtysh_pager_name && fp && closepager)
{
@@ -441,17 +441,17 @@ vtysh_execute_func (char *line, int pager)
return;
}
- ret = cmd_execute_command (vline, vty, &cmd);
- cmd_free_strvec (vline);
- if (ret != CMD_SUCCESS_DAEMON)
- break;
+ ret = cmd_execute_command (vline, vty, &cmd);
+ cmd_free_strvec (vline);
+ if (ret != CMD_SUCCESS_DAEMON)
+ break;
}
else
if (cmd->func)
{
(*cmd->func) (cmd, vty, 0, NULL);
break;
- }
+ }
}
if (cmd->daemon & VTYSH_ZEBRA)
@@ -478,10 +478,10 @@ vtysh_execute_func (char *line, int pager)
if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_BGP], line, fp)
!= CMD_SUCCESS)
break;
- if (cmd->daemon & VTYSH_ISISD)
- if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS], line, fp)
- != CMD_SUCCESS)
- break;
+ if (cmd->daemon & VTYSH_ISISD)
+ if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS], line, fp)
+ != CMD_SUCCESS)
+ break;
if (cmd->func)
(*cmd->func) (cmd, vty, 0, NULL);
}
@@ -602,10 +602,10 @@ vtysh_config_from_file (struct vty *vty, FILE *fp)
if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_BGP],
vty->buf, stdout) != CMD_SUCCESS)
break;
- if (cmd->daemon & VTYSH_ISISD)
- if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS],
- vty->buf, stdout) != CMD_SUCCESS)
- break;
+ if (cmd->daemon & VTYSH_ISISD)
+ if (vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ISIS],
+ vty->buf, stdout) != CMD_SUCCESS)
+ break;
if (cmd->func)
(*cmd->func) (cmd, vty, 0, NULL);
}
@@ -684,12 +684,12 @@ vtysh_rl_describe ()
if (! desc->str)
fprintf (stdout," %-s\n",
- desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd);
+ desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd);
else
fprintf (stdout," %-*s %s\n",
- width,
- desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
- desc->str);
+ width,
+ desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
+ desc->str);
}
cmd_free_strvec (vline);
@@ -956,12 +956,12 @@ DEFUNSH (VTYSH_OSPF6D,
}
DEFUNSH (VTYSH_ISISD,
- router_isis,
- router_isis_cmd,
- "router isis WORD",
- ROUTER_STR
- "ISO IS-IS\n"
- "ISO Routing area tag")
+ router_isis,
+ router_isis_cmd,
+ "router isis WORD",
+ ROUTER_STR
+ "ISO IS-IS\n"
+ "ISO Routing area tag")
{
vty->node = ISIS_NODE;
return CMD_SUCCESS;
@@ -1116,10 +1116,10 @@ ALIAS (vtysh_exit_ripd,
"Exit current mode and down to previous mode\n")
DEFUNSH (VTYSH_RIPNGD,
- vtysh_exit_ripngd,
- vtysh_exit_ripngd_cmd,
- "exit",
- "Exit current mode and down to previous mode\n")
+ vtysh_exit_ripngd,
+ vtysh_exit_ripngd_cmd,
+ "exit",
+ "Exit current mode and down to previous mode\n")
{
return vtysh_exit (vty);
}
@@ -1172,10 +1172,10 @@ ALIAS (vtysh_exit_ospfd,
"Exit current mode and down to previous mode\n")
DEFUNSH (VTYSH_OSPF6D,
- vtysh_exit_ospf6d,
- vtysh_exit_ospf6d_cmd,
- "exit",
- "Exit current mode and down to previous mode\n")
+ vtysh_exit_ospf6d,
+ vtysh_exit_ospf6d_cmd,
+ "exit",
+ "Exit current mode and down to previous mode\n")
{
return vtysh_exit (vty);
}
@@ -1186,10 +1186,10 @@ ALIAS (vtysh_exit_ospf6d,
"Exit current mode and down to previous mode\n")
DEFUNSH (VTYSH_ISISD,
- vtysh_exit_isisd,
- vtysh_exit_isisd_cmd,
- "exit",
- "Exit current mode and down to previous mode\n")
+ vtysh_exit_isisd,
+ vtysh_exit_isisd_cmd,
+ "exit",
+ "Exit current mode and down to previous mode\n")
{
return vtysh_exit (vty);
}
@@ -1301,12 +1301,12 @@ struct vtysh_writeconfig_t {
} vtysh_wc = {-1,0};
DEFUN (vtysh_write_config,
- vtysh_write_config_cmd,
- "write-config (daemon|integrated)",
- "Specify config files to write to\n"
- "Write per daemon file\n"
- "Write integrated file\n"
-)
+ vtysh_write_config_cmd,
+ "write-config (daemon|integrated)",
+ "Specify config files to write to\n"
+ "Write per daemon file\n"
+ "Write integrated file\n"
+ )
{
if (!strncmp(argv[0],"d",1)) {
vtysh_wc.daemon = 1;
@@ -1317,10 +1317,10 @@ DEFUN (vtysh_write_config,
}
DEFUN (no_vtysh_write_config,
- no_vtysh_write_config_cmd,
- "no write-config (daemon|integrated)",
- "Negate per daemon and/or integrated config files\n"
-)
+ no_vtysh_write_config_cmd,
+ "no write-config (daemon|integrated)",
+ "Negate per daemon and/or integrated config files\n"
+ )
{
if (!strncmp(argv[0],"d",1)) {
vtysh_wc.daemon = 0;
@@ -1441,7 +1441,7 @@ ALIAS (vtysh_write_terminal,
"show running-config",
SHOW_STR
"Current operating configuration\n")
-
+
/* Execute command in child process. */
int
execute_command (char *command, int argc, char *arg1, char *arg2)
@@ -1606,7 +1606,7 @@ DEFUN (vtysh_start_zsh,
execute_command ("zsh", 0, NULL, NULL);
return CMD_SUCCESS;
}
-
+
/* Route map node structure. */
struct cmd_node rmap_node =
{
@@ -1676,7 +1676,7 @@ struct cmd_node keychain_key_node =
KEYCHAIN_KEY_NODE,
"%s(config-keychain-key)# "
};
-
+
void
vtysh_install_default (enum node_type node)
{
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 9411dc3c..9a0bff49 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -184,11 +184,11 @@ vtysh_config_parse_line (char *line)
else if (strncmp (line, "router rip", strlen ("router rip")) == 0)
config = config_get (RIP_NODE, line);
else if (strncmp (line, "router ripng", strlen ("router ripng")) == 0)
- config = config_get (RIPNG_NODE, line);
+ config = config_get (RIPNG_NODE, line);
else if (strncmp (line, "router ospf", strlen ("router ospf")) == 0)
- config = config_get (OSPF_NODE, line);
+ config = config_get (OSPF_NODE, line);
else if (strncmp (line, "router ospf6", strlen ("router ospf6")) == 0)
- config = config_get (OSPF6_NODE, line);
+ config = config_get (OSPF6_NODE, line);
else if (strncmp (line, "router bgp", strlen ("router bgp")) == 0)
config = config_get (BGP_NODE, line);
else if (strncmp (line, "router isis", strlen ("router isis")) == 0)
@@ -200,11 +200,11 @@ vtysh_config_parse_line (char *line)
else if (strncmp (line, "access-list", strlen ("access-list")) == 0)
config = config_get (ACCESS_NODE, line);
else if (strncmp (line, "ipv6 access-list", strlen ("ipv6 access-list")) == 0)
- config = config_get (ACCESS_IPV6_NODE, line);
+ config = config_get (ACCESS_IPV6_NODE, line);
else if (strncmp (line, "ip prefix-list", strlen ("ip prefix-list")) == 0)
config = config_get (PREFIX_NODE, line);
else if (strncmp (line, "ipv6 prefix-list", strlen ("ipv6 prefix-list")) == 0)
- config = config_get (PREFIX_IPV6_NODE, line);
+ config = config_get (PREFIX_IPV6_NODE, line);
else if (strncmp (line, "ip as-path access-list", strlen ("ip as-path access-list")) == 0)
config = config_get (AS_LIST_NODE, line);
else if (strncmp (line, "ip community-list", strlen ("ip community-list")) == 0)
@@ -284,7 +284,7 @@ vtysh_config_dump (FILE *fp)
LIST_LOOP (master, config, nn)
{
fprintf (fp, "%s\n", config->name);
- fflush (fp);
+ fflush (fp);
LIST_LOOP (config->line, line, nm)
{
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 047e21e9..0d2808e9 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -35,7 +35,7 @@
#include "vtysh/vtysh.h"
#include "vtysh/vtysh_user.h"
-
+
/* VTY shell program name. */
char *progname;
@@ -68,7 +68,7 @@ static char *line_read;
/* Master of threads. */
struct thread_master *master;
-
+
/* SIGTSTP handler. This function care user's ^Z input. */
void
sigtstp (int sig)
@@ -134,7 +134,7 @@ signal_init ()
signal_set (SIGTSTP, sigtstp);
signal_set (SIGPIPE, SIG_IGN);
}
-
+
/* Help information display. */
static void
usage (int status)
@@ -157,14 +157,14 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS);
/* VTY shell options, we use GNU getopt library. */
struct option longopts[] =
{
- { "boot", no_argument, NULL, 'b'},
+ { "boot", no_argument, NULL, 'b'},
/* For compatibility with older zebra/quagga versions */
{ "eval", required_argument, NULL, 'e'},
{ "command", required_argument, NULL, 'c'},
{ "help", no_argument, NULL, 'h'},
{ 0 }
};
-
+
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
char *
vtysh_rl_gets ()
@@ -194,7 +194,7 @@ vtysh_rl_gets ()
return (line_read);
}
-
+
/* VTY shell main routine. */
int
main (int argc, char **argv, char **env)