cli.c

来自「cli source code used in switch」· C语言 代码 · 共 48 行

C
48
字号
#include <stdio.h>#include <string.h>#include <signal.h>#include "vtysh.h"#include "command.h"#include "usrsys.h"#if 1#include "version.h"#endifintmain (	int	argc,	char **	argv	){	/* Disable CTRL-C */	signal(SIGINT, SIG_IGN);#if 1    // cli version	printf("VIA CLI version: %s\n", CLI_VERSION);#endif	/* Check command-line arguments */	if (argc == 2) {		if (strcmp(argv[1], "init") == 0) {			cli_on_init();			/* initialize from flash configurations then exit */			/* this part is used to initialize switch settings */			U_SysInitFromFlashAllStart(); // 2007-1-26 SteveLin commented, for testing			return 0;		}	}	/* Initialization */	vtysh_init();	/* Main command loop */	vtysh_cmd_loop();	printf("\n");	return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?