From 1d7314f7fbb4e4dd377349271e11a1130e6cb2da Mon Sep 17 00:00:00 2001 From: rd235 Date: Wed, 5 Oct 2005 19:58:59 +0000 Subject: [PATCH] Fixed some details on help messages git-svn-id: https://vde.svn.sourceforge.net/svnroot/vde/trunk@52 d37a7db1-d92d-0410-89df-f68f52f87b57 --- vde-2/consmgmt.c | 13 +++++++++---- vde-2/datasock.c | 2 +- vde-2/fstp.c | 4 ++-- vde-2/port.c | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/vde-2/consmgmt.c b/vde-2/consmgmt.c index da32fad..c6e373c 100644 --- a/vde-2/consmgmt.c +++ b/vde-2/consmgmt.c @@ -199,8 +199,14 @@ static void handle_input(unsigned char type,int fd,int revents,int *unused) cmdout=handle_cmd(type,(type==console_type)?STDOUT_FILENO:fd,buf); if (cmdout >= 0) write(fd,prompt,strlen(prompt)); - else if(type==mgmt_data) - remove_fd(fd); + else { + if(type==mgmt_data) { + printoutc(fd,"9999 END OF SESSION"); + remove_fd(fd); + } + if (cmdout == -2) + exit(0); + } } } else {/* mgmt ctl */ struct sockaddr addr; @@ -395,8 +401,7 @@ static int vde_logout() static int vde_shutdown() { printlog(LOG_WARNING,"Shutdown from mgmt command"); - exit(0); - return -1; + return -2; } static int showinfo(int fd) diff --git a/vde-2/datasock.c b/vde-2/datasock.c index 26bcd15..d12b0f2 100644 --- a/vde-2/datasock.c +++ b/vde-2/datasock.c @@ -380,7 +380,7 @@ static int showinfo(int fd) static struct comlist cl[]={ {"ds","============","DATA SOCKET MENU",NULL,NOARG}, - {"ds/showinfo","","show ds info",showinfo,NOARG}, + {"ds/showinfo","","show ds info",showinfo,NOARG|WITHFD}, }; static void delep (int fd, void* data, void *descr) diff --git a/vde-2/fstp.c b/vde-2/fstp.c index 6321380..6944826 100644 --- a/vde-2/fstp.c +++ b/vde-2/fstp.c @@ -651,9 +651,9 @@ static int fstsetedge(char *arg) } static struct comlist cl[]={ - {"fstp","============","FAST SPANNING TREE MANAGEMENT MENU",NULL,NOARG}, - {"fstp/setfstp","0/1","Fast spanning tree protocol 1=ON 0=OFF",fstpsetonoff,INTARG}, + {"fstp","============","FAST SPANNING TREE MENU",NULL,NOARG}, {"fstp/showinfo","","show fstp info",fstpshowinfo,NOARG|WITHFD}, + {"fstp/setfstp","0/1","Fast spanning tree protocol 1=ON 0=OFF",fstpsetonoff,INTARG}, {"fstp/setedge","VLAN PORT 1/0","Define an edge port for a vlan 1=Y 0=N",fstsetedge,STRARG}, {"fstp/bonus","VLAN PORT COST","set the port bonus for a vlan",fstsetbonus,STRARG}, {"fstp/print","[N]","print fst data for the defined vlan",fstprint,STRARG|WITHFD}, diff --git a/vde-2/port.c b/vde-2/port.c index f9bc217..1336516 100644 --- a/vde-2/port.c +++ b/vde-2/port.c @@ -856,9 +856,9 @@ static int setmacaddr(char *strmac) static struct comlist cl[]={ {"port","============","PORT STATUS MENU",NULL,NOARG}, - {"port/setnumports","","set the number of ports",portsetnumports,INTARG}, - /*{"port/setmacaddr","MAC","set the switch MAC address",setmacaddr,STRARG},*/ {"port/showinfo","","show hash info",showinfo,NOARG|WITHFD}, + {"port/setnumports","N","set the number of ports",portsetnumports,INTARG}, + /*{"port/setmacaddr","MAC","set the switch MAC address",setmacaddr,STRARG},*/ {"port/sethub","0/1","1=HUB 0=switch",portsethub,INTARG}, {"port/setvlan","N VLAN","set port VLAN (untagged)",portsetvlan,STRARG}, {"port/create","N","create the port N (inactive)",portcreate,INTARG}, -- 2.11.4.GIT