[svn-commits] mspiceland: branch linux/rmeyerriecks/dahdi-tools-maintmodes r7454 - /linux/t...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Oct 30 15:42:28 CDT 2009
Author: mspiceland
Date: Fri Oct 30 15:42:25 2009
New Revision: 7454
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7454
Log:
Change status printouts to be consistant.
Modified:
linux/team/rmeyerriecks/dahdi-tools-maintmodes/dahdi_maint.c
Modified: linux/team/rmeyerriecks/dahdi-tools-maintmodes/dahdi_maint.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-tools-maintmodes/dahdi_maint.c?view=diff&rev=7454&r1=7453&r2=7454
==============================================================================
--- linux/team/rmeyerriecks/dahdi-tools-maintmodes/dahdi_maint.c (original)
+++ linux/team/rmeyerriecks/dahdi-tools-maintmodes/dahdi_maint.c Fri Oct 30 15:42:25 2009
@@ -124,13 +124,14 @@
if(localhostloopback) {
if(!strcasecmp(harg, "on")) {
- printf("Turning on Host Loopback for span: %d\n", span);
+ printf("span %d: local host loopback ON\n", span);
m.command = DAHDI_MAINT_LOCALLOOP;
} else if (!strcasecmp(harg, "off")) {
- printf("Turning off Host Loopback for span: %d\n", span);
+ printf("span %d: local host loopback OFF\n", span);
m.command = DAHDI_MAINT_NONE;
} else {
- printf("Usage: maint -l <on|off>\n");
+ display_help();
+ exit(1);
}
res = ioctl(ctl, DAHDI_MAINT, &m);
@@ -138,26 +139,28 @@
if(networklineloopback) {
if(!strcasecmp(larg, "on")) {
- printf("Turning network line loopback on\n");
+ printf("span %d: network line loopback ON\n", span);
m.command = DAHDI_MAINT_NETWORKLINELOOP;
} else if (!strcasecmp(larg, "off")) {
- printf("Turning network line loopback off\n");
+ printf("span %d: network line loopback OFF\n", span);
m.command = DAHDI_MAINT_NONE;
} else {
- printf("Usage: maint -r <on|off>\n");
+ display_help();
+ exit(1);
}
res = ioctl(ctl, DAHDI_MAINT, &m);
}
if(networkpayloadloopback) {
if(!strcasecmp(parg, "on")) {
- printf("Turning network payload loopback on\n");
+ printf("span %d: network payload loopback ON\n", span);
m.command = DAHDI_MAINT_NETWORKPAYLOADLOOP;
} else if (!strcasecmp(parg, "off")) {
- printf("Turning network payload loopback off\n");
+ printf("span %d: network payload loopback OFF\n", span);
m.command = DAHDI_MAINT_NONE;
} else {
- printf("Usage: dahdi_maint -r <on|off>\n");
+ display_help();
+ exit(1);
}
res = ioctl(ctl, DAHDI_MAINT, &m);
}
@@ -182,7 +185,8 @@
m.command = DAHDI_MAINT_BIPOLAR_DEFECT;
printf("Inserting a single bipolar defect\n");
} else {
- printf("Usage: maint -d <fas|multi|crc|cas|prbs|bipolar>\n");
+ display_help();
+ exit(1);
}
res = ioctl(ctl, DAHDI_MAINT, &m);
}
More information about the svn-commits
mailing list