[svn-commits] rmeyerriecks: tools/trunk r8290 - /tools/trunk/dahdi_maint.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Mar 8 17:22:27 CST 2010
Author: rmeyerriecks
Date: Mon Mar 8 17:22:24 2010
New Revision: 8290
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8290
Log:
dahdi_maint: Added unsupported function handling
Added handling for -1 returns by the driver. This indicates
that the specific hardware doesn't support a particular
feature.
Modified:
tools/trunk/dahdi_maint.c
Modified: tools/trunk/dahdi_maint.c
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/dahdi_maint.c?view=diff&rev=8290&r1=8289&r2=8290
==============================================================================
--- tools/trunk/dahdi_maint.c (original)
+++ tools/trunk/dahdi_maint.c Mon Mar 8 17:22:24 2010
@@ -139,6 +139,8 @@
if (!(doloopback || iflag || gflag || rflag)) {
s.spanno = span;
res = ioctl(ctl, DAHDI_SPANSTAT, &s);
+ if (res)
+ printf("Error counters not supported on this card\n");
printf("Span %d:\n", span);
printf(">FEC : %d:\n", s.fecount);
printf(">CEC : %d:\n", s.crc4count);
@@ -171,6 +173,9 @@
}
res = ioctl(ctl, DAHDI_MAINT, &m);
+ if (res)
+ printf("This type of looping not"\
+ "supported on this card\n");
}
if (iflag) {
@@ -196,6 +201,8 @@
display_help(argv[0], 1);
}
res = ioctl(ctl, DAHDI_MAINT, &m);
+ if (res)
+ printf("Network line loop not supported on this card\n");
}
if (gflag) {
@@ -203,12 +210,20 @@
" and Monitor\n");
m.command = DAHDI_MAINT_PRBS;
res = ioctl(ctl, DAHDI_MAINT, &m);
+ if (res) {
+ printf("This type of error injection is not"\
+ " supported on this card\n");
+ }
}
if (rflag) {
printf("Resetting error counters for span %d\n", span);
m.command = DAHDI_RESET_COUNTERS;
res = ioctl(ctl, DAHDI_MAINT, &m);
+ if (res) {
+ printf("Resetting error counters"\
+ " is not supported on this card\n");
+ }
}
return 0;
More information about the svn-commits
mailing list