From add8ef14f39b1db9652bad7db9d50f995d3a8802 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Fri, 23 May 2008 16:32:43 +0000 Subject: Remove remaining references to zap devices and some zaptel references git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4352 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- Makefile | 8 ++-- acinclude.m4 | 2 +- build_tools/genmodconf | 20 ++++----- build_tools/genudevrules | 18 ++++---- dahdi_cfg.c | 2 +- dahdi_monitor.c | 4 +- dahdi_scan.c | 2 +- dahdi_speed.c | 2 +- dahdi_test.c | 8 ++-- dahdi_tool.c | 2 +- fxotune.c | 112 +++++++++++++++++++++++------------------------ fxstest.c | 2 +- 12 files changed, 91 insertions(+), 91 deletions(-) diff --git a/Makefile b/Makefile index de7f8b2..cefac1c 100644 --- a/Makefile +++ b/Makefile @@ -7,14 +7,14 @@ CFLAGS+=-DBUILDING_TONEZONE -# If the file .zaptel.makeopts is present in your home directory, you can +# If the file .dahdi.makeopts is present in your home directory, you can # include all of your favorite menuselect options so that every time you download # a new version of Asterisk, you don't have to run menuselect to set them. -# The file /etc/zaptel.makeopts will also be included but can be overridden +# The file /etc/dahdi.makeopts will also be included but can be overridden # by the file in your home directory. -GLOBAL_MAKEOPTS=$(wildcard /etc/zaptel.makeopts) -USER_MAKEOPTS=$(wildcard ~/.zaptel.makeopts) +GLOBAL_MAKEOPTS=$(wildcard /etc/dahdi.makeopts) +USER_MAKEOPTS=$(wildcard ~/.dahdi.makeopts) ifeq ($(strip $(foreach var,clean distclean dist-clean update,$(findstring $(var),$(MAKECMDGOALS)))),) ifneq ($(wildcard menuselect.makeopts),) diff --git a/acinclude.m4 b/acinclude.m4 index b8cd151..57db604 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -83,7 +83,7 @@ AC_DEFUN( done ; ) ; if test "x$GNU_MAKE" = "xNot Found" ; then - AC_MSG_ERROR(*** Please install GNU make. It is required to build Zaptel!) + AC_MSG_ERROR(*** Please install GNU make. It is required to build DAHDI tools!) fi AC_SUBST([GNU_MAKE]) ]) diff --git a/build_tools/genmodconf b/build_tools/genmodconf index ada453e..b4d740b 100755 --- a/build_tools/genmodconf +++ b/build_tools/genmodconf @@ -1,7 +1,7 @@ #!/bin/sh # this script makes an attempt to build a proper set of rules -# for loading the Zaptel modules and automatically running ztcfg +# for loading the DAHDI modules and automatically running dahdi_cfg # # it accepts three parameters: # the kernel major version being targeted (either linux24 or linux26) @@ -11,19 +11,19 @@ # the process is as follows: # # for linux24, the file can be located either at /etc/modules.conf (combined -# with all other rules) or in /etc/modutils/zaptel (only the Zaptel rules) +# with all other rules) or in /etc/modutils/dahdi (only the DAHDI rules) # # for linux26, the file can be located at /etc/modprobe.conf (combined with all -# other rules), /etc/modprobe.d/zaptel (Zaptel only) or /etc/modules.d/zaptel -# (Zaptel only) +# other rules), /etc/modprobe.d/dahdi (DAHDI only) or /etc/modules.d/dahdi +# (DAHDI only) # -# when the file is Zaptel rules only, then we don't preserve the existing +# when the file is DAHDI rules only, then we don't preserve the existing # contents of the file; the system administrator can put desired options and # overrides in a separate file with a name that appears earlier in the sort # order, so there is no need to edit the file produced by this script # # when the file is combined with all other rules, then we make a backup -# of it and remove all the old Zaptel rules we can find, replacing them with +# of it and remove all the old DAHDI rules we can find, replacing them with # new ones # # in addition, for linux26, versions of module-init-tools 3.2.0 and later @@ -33,7 +33,7 @@ if [ "${1}" = "linux24" ]; then if [ -d ${2}/etc/modutils ]; then - target=${2}/etc/modutils/zaptel + target=${2}/etc/modutils/dahdi elif [ -f ${2}/etc/modules.conf ]; then target=${2}/etc/modules.conf combined=1 @@ -47,9 +47,9 @@ elif [ "${1}" = "linux26" ]; then cmdopts=\$CMDLINE_OPTS fi if [ -d ${2}/etc/modprobe.d ]; then - target=${2}/etc/modprobe.d/zaptel + target=${2}/etc/modprobe.d/dahdi elif [ -d ${2}/etc/modules.d ]; then - target=${2}/etc/modules.d/zaptel + target=${2}/etc/modules.d/dahdi elif [ -f ${2}/etc/modprobe.conf ]; then target=${2}/etc/modprobe.conf combined=1 @@ -102,6 +102,6 @@ if [ -z "${combined}" ]; then echo "*** In the future, do not edit ${target}, but" echo "*** instead put your changes in another file" echo "*** in the same directory so that they will not" - echo "*** be overwritten by future Zaptel updates." + echo "*** be overwritten by future DAHDI updates." echo "***" fi diff --git a/build_tools/genudevrules b/build_tools/genudevrules index 17e1f90..c3081c9 100755 --- a/build_tools/genudevrules +++ b/build_tools/genudevrules @@ -21,15 +21,15 @@ else fi cat < * Based on previous works, designs, and architectures conceived and diff --git a/dahdi_monitor.c b/dahdi_monitor.c index ddbd652..3eb9511 100644 --- a/dahdi_monitor.c +++ b/dahdi_monitor.c @@ -1,5 +1,5 @@ /* - * Monitor a Zaptel Channel + * Monitor a DAHDI Channel * * Written by Mark Spencer * Based on previous works, designs, and architectures conceived and @@ -132,7 +132,7 @@ int pseudo_open(void) { int fd; int x = 1; - fd = open("/dev/zap/pseudo", O_RDWR); + fd = open("/dev/dahdi/pseudo", O_RDWR); if (fd < 0) { fprintf(stderr, "Unable to open pseudo channel: %s\n", strerror(errno)); return -1; diff --git a/dahdi_scan.c b/dahdi_scan.c index ee7d5c9..96d9576 100644 --- a/dahdi_scan.c +++ b/dahdi_scan.c @@ -1,5 +1,5 @@ /* - * Scan and output information about Zaptel spans and ports. + * Scan and output information about DAHDI spans and ports. * * Written by Brandon Kruse * and Kevin P. Fleming diff --git a/dahdi_speed.c b/dahdi_speed.c index 5959258..d867c9a 100644 --- a/dahdi_speed.c +++ b/dahdi_speed.c @@ -2,7 +2,7 @@ * * Generic speed test -- Run an infinite loop and * see how high we can count (in 5 seconds). You - * can use this to measure how much CPU zaptel REALLY + * can use this to measure how much CPU DAHDI REALLY * is taking. * * MUST BE COMPILED WITHOUT OPTIMIZATION diff --git a/dahdi_test.c b/dahdi_test.c index d3695f8..d80fc0e 100644 --- a/dahdi_test.c +++ b/dahdi_test.c @@ -57,9 +57,9 @@ int main(int argc, char *argv[]) float score; float ms; struct timeval start, now; - fd = open("/dev/zap/pseudo", O_RDWR); + fd = open("/dev/dahdi/pseudo", O_RDWR); if (fd < 0) { - fprintf(stderr, "Unable to open zap interface: %s\n", strerror(errno)); + fprintf(stderr, "Unable to open dahdi interface: %s\n", strerror(errno)); exit(1); } @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) seconds = atoi(argv[curarg + 1]); curarg++; } - printf("Opened pseudo zap interface, measuring accuracy...\n"); + printf("Opened pseudo dahdi interface, measuring accuracy...\n"); signal(SIGHUP, hup_handler); signal(SIGINT, hup_handler); signal(SIGALRM, hup_handler); @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) percent = 100.0 * (count - ms) / count; if (verbose) - printf("\n%d zaptel samples in %0.3f system clock sample intervals (%.3f%%)", + printf("\n%d samples in %0.3f system clock sample intervals (%.3f%%)", count, ms, 100 - percent); else if ((pass % 8) == 7) printf("\n"); score = 100.0 - fabs(percent); diff --git a/dahdi_tool.c b/dahdi_tool.c index c1fdba2..5d87c20 100644 --- a/dahdi_tool.c +++ b/dahdi_tool.c @@ -167,7 +167,7 @@ static void sel_callback(newtComponent c, void *cbdata) snprintf(info2, sizeof(info2), "%-59s F1=Details F10=Quit", info); } else { span = -1; - strcpy(info, "There are no zaptel spans on this system."); + strcpy(info, "There are no DAHDI spans on this system."); snprintf(info2, sizeof(info2), "%-59s F10=Quit", info); } newtPopHelpLine(); diff --git a/fxotune.c b/fxotune.c index b152487..5c4cce8 100644 --- a/fxotune.c +++ b/fxotune.c @@ -35,7 +35,7 @@ static const float amplitude = 16384.0; -static char *zappath = "/dev/zap"; +static char *dahdipath = "/dev/dahdi"; static char *configfile = "/etc/fxotune.conf"; static int audio_dump_fd = -1; @@ -334,7 +334,7 @@ static float calc_magnitude(short *inbuf, int insamps) /** * dumps input and output buffer contents for the echo test - used to see exactly what's going on */ -static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) +static int maptone(int whichdahdi, int freq, char *dialstr, int delayuntilsilence) { int i = 0; int res = 0, x = 0; @@ -349,13 +349,13 @@ static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) } x = 1; - if (ioctl(whichzap, DAHDI_SETLINEAR, &x)) { + if (ioctl(whichdahdi, DAHDI_SETLINEAR, &x)) { fprintf(stderr, "Unable to set channel to signed linear mode.\n"); return -1; } memset(&bi, 0, sizeof(bi)); - if (ioctl(whichzap, DAHDI_GET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_GET_BUFINFO, &bi)) { fprintf(stderr, "Unable to get buffer information!\n"); return -1; } @@ -363,7 +363,7 @@ static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) bi.bufsize = TEST_DURATION; /* KD - changed from BUFFER_LENGTH; */ bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE; bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE; - if (ioctl(whichzap, DAHDI_SET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_SET_BUFINFO, &bi)) { fprintf(stderr, "Unable to set buffer information!\n"); return -1; } @@ -382,7 +382,7 @@ static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) /* Make sure the line is clear */ struct silence_info sinfo; memset(&sinfo, 0, sizeof(sinfo)); - sinfo.device = whichzap; + sinfo.device = whichdahdi; sinfo.dialstr = dialstr; sinfo.initial_delay = delayuntilsilence; sinfo.reset_after = 4; /* doesn't matter - we are only running one test */ @@ -394,13 +394,13 @@ static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) /* Flush buffers */ x = DAHDI_FLUSH_READ | DAHDI_FLUSH_WRITE | DAHDI_FLUSH_EVENT; - if (ioctl(whichzap, DAHDI_FLUSH, &x)) { + if (ioctl(whichdahdi, DAHDI_FLUSH, &x)) { fprintf(stderr, "Unable to flush I/O: %s\n", strerror(errno)); return -1; } /* send data out on line */ - res = write(whichzap, outbuf, BUFFER_LENGTH); /* we are sending a TEST_DURATION length array of shorts (which are 2 bytes each) */ + res = write(whichdahdi, outbuf, BUFFER_LENGTH); /* we are sending a TEST_DURATION length array of shorts (which are 2 bytes each) */ if (res != BUFFER_LENGTH) { fprintf(stderr, "Could not write all data to line\n"); return -1; @@ -408,11 +408,11 @@ static int maptone(int whichzap, int freq, char *dialstr, int delayuntilsilence) retry: /* read return response */ - res = fxotune_read(whichzap, inbuf, BUFFER_LENGTH); + res = fxotune_read(whichdahdi, inbuf, BUFFER_LENGTH); if (res != BUFFER_LENGTH) { int x; - ioctl(whichzap, DAHDI_GETEVENT, &x); + ioctl(whichdahdi, DAHDI_GETEVENT, &x); goto retry; } @@ -464,7 +464,7 @@ retry: * http://www.silabs.com/public/documents/tpub_doc/anote/Wireline/Silicon_DAA/en/an84.pdf * */ -static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilence, int silencegoodfor, struct wctdm_echo_coefs *coefs_out) +static int acim_tune2(int whichdahdi, int freq, char *dialstr, int delayuntilsilence, int silencegoodfor, struct wctdm_echo_coefs *coefs_out) { int i = 0; int res = 0, x = 0; @@ -483,19 +483,19 @@ static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilen } /* Set echo settings */ - if (ioctl(whichzap, WCTDM_SET_ECHOTUNE, &echo_trys[0])) { - fprintf(stderr, "Unable to set impedance on fd %d\n", whichzap); + if (ioctl(whichdahdi, WCTDM_SET_ECHOTUNE, &echo_trys[0])) { + fprintf(stderr, "Unable to set impedance on fd %d\n", whichdahdi); return -1; } x = 1; - if (ioctl(whichzap, DAHDI_SETLINEAR, &x)) { + if (ioctl(whichdahdi, DAHDI_SETLINEAR, &x)) { fprintf(stderr, "Unable to set channel to signed linear mode.\n"); return -1; } memset(&bi, 0, sizeof(bi)); - if (ioctl(whichzap, DAHDI_GET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_GET_BUFINFO, &bi)) { fprintf(stderr, "Unable to get buffer information!\n"); return -1; } @@ -503,13 +503,13 @@ static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilen bi.bufsize = BUFFER_LENGTH; bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE; bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE; - if (ioctl(whichzap, DAHDI_SET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_SET_BUFINFO, &bi)) { fprintf(stderr, "Unable to set buffer information!\n"); return -1; } x = DAHDI_OFFHOOK; - if (ioctl(whichzap, DAHDI_HOOK, &x)) { - fprintf(stderr, "Cannot bring fd %d off hook", whichzap); + if (ioctl(whichdahdi, DAHDI_HOOK, &x)) { + fprintf(stderr, "Cannot bring fd %d off hook", whichdahdi); return -1; } @@ -517,7 +517,7 @@ static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilen /* Set up silence settings */ struct silence_info sinfo; memset(&sinfo, 0, sizeof(sinfo)); - sinfo.device = whichzap; + sinfo.device = whichdahdi; sinfo.dialstr = dialstr; sinfo.initial_delay = delayuntilsilence; sinfo.reset_after = silencegoodfor; @@ -542,20 +542,20 @@ static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilen return -1; } - if (ioctl(whichzap, WCTDM_SET_ECHOTUNE, &echo_trys[trys])) { - fprintf(stderr, "Unable to set echo coefficients on fd %d\n", whichzap); + if (ioctl(whichdahdi, WCTDM_SET_ECHOTUNE, &echo_trys[trys])) { + fprintf(stderr, "Unable to set echo coefficients on fd %d\n", whichdahdi); return -1; } /* Flush buffers */ x = DAHDI_FLUSH_READ | DAHDI_FLUSH_WRITE | DAHDI_FLUSH_EVENT; - if (ioctl(whichzap, DAHDI_FLUSH, &x)) { + if (ioctl(whichdahdi, DAHDI_FLUSH, &x)) { fprintf(stderr, "Unable to flush I/O: %s\n", strerror(errno)); return -1; } /* send data out on line */ - res = write(whichzap, outbuf, BUFFER_LENGTH); + res = write(whichdahdi, outbuf, BUFFER_LENGTH); if (res != BUFFER_LENGTH) { fprintf(stderr, "Could not write all data to line\n"); return -1; @@ -563,11 +563,11 @@ static int acim_tune2(int whichzap, int freq, char *dialstr, int delayuntilsilen retry: /* read return response */ - res = fxotune_read(whichzap, inbuf, BUFFER_LENGTH * 2); + res = fxotune_read(whichdahdi, inbuf, BUFFER_LENGTH * 2); if (res != BUFFER_LENGTH * 2) { int x; - ioctl(whichzap, DAHDI_GETEVENT, &x); + ioctl(whichdahdi, DAHDI_GETEVENT, &x); goto retry; } @@ -624,7 +624,7 @@ retry: /** * Perform calibration type 1 on the specified device. Only tunes the line impedance. Look for best response range */ -static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int silencegoodfor, struct wctdm_echo_coefs *coefs_out) +static int acim_tune(int whichdahdi, char *dialstr, int delayuntilsilence, int silencegoodfor, struct wctdm_echo_coefs *coefs_out) { int i = 0, freq = 0, acim = 0; int res = 0, x = 0; @@ -647,26 +647,26 @@ static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int sil /* Set up silence settings */ struct silence_info sinfo; memset(&sinfo, 0, sizeof(sinfo)); - sinfo.device = whichzap; + sinfo.device = whichdahdi; sinfo.dialstr = dialstr; sinfo.initial_delay = delayuntilsilence; sinfo.reset_after = silencegoodfor; /* Set echo settings */ memset(&coefs, 0, sizeof(coefs)); - if (ioctl(whichzap, WCTDM_SET_ECHOTUNE, &coefs)) { + if (ioctl(whichdahdi, WCTDM_SET_ECHOTUNE, &coefs)) { fprintf(stdout, "Skipping non-TDM / non-FXO\n"); return -1; } x = 1; - if (ioctl(whichzap, DAHDI_SETLINEAR, &x)) { + if (ioctl(whichdahdi, DAHDI_SETLINEAR, &x)) { fprintf(stderr, "Unable to set channel to signed linear mode.\n"); return -1; } memset(&bi, 0, sizeof(bi)); - if (ioctl(whichzap, DAHDI_GET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_GET_BUFINFO, &bi)) { fprintf(stderr, "Unable to get buffer information!\n"); return -1; } @@ -674,7 +674,7 @@ static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int sil bi.bufsize = BUFFER_LENGTH; bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE; bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE; - if (ioctl(whichzap, DAHDI_SET_BUFINFO, &bi)) { + if (ioctl(whichdahdi, DAHDI_SET_BUFINFO, &bi)) { fprintf(stderr, "Unable to set buffer information!\n"); return -1; } @@ -683,8 +683,8 @@ static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int sil float freq_results[15]; coefs.acim = acim; - if (ioctl(whichzap, WCTDM_SET_ECHOTUNE, &coefs)) { - fprintf(stderr, "Unable to set impedance on fd %d\n", whichzap); + if (ioctl(whichdahdi, WCTDM_SET_ECHOTUNE, &coefs)) { + fprintf(stderr, "Unable to set impedance on fd %d\n", whichdahdi); return -1; } @@ -702,13 +702,13 @@ static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int sil /* Flush buffers */ x = DAHDI_FLUSH_READ | DAHDI_FLUSH_WRITE | DAHDI_FLUSH_EVENT; - if (ioctl(whichzap, DAHDI_FLUSH, &x)) { + if (ioctl(whichdahdi, DAHDI_FLUSH, &x)) { fprintf(stderr, "Unable to flush I/O: %s\n", strerror(errno)); return -1; } /* send data out on line */ - res = write(whichzap, outbuf, BUFFER_LENGTH); + res = write(whichdahdi, outbuf, BUFFER_LENGTH); if (res != BUFFER_LENGTH) { fprintf(stderr, "Could not write all data to line\n"); return -1; @@ -717,11 +717,11 @@ static int acim_tune(int whichzap, char *dialstr, int delayuntilsilence, int sil /* read return response */ retry: /* read return response */ - res = fxotune_read(whichzap, inbuf, BUFFER_LENGTH); + res = fxotune_read(whichdahdi, inbuf, BUFFER_LENGTH); if (res != BUFFER_LENGTH) { int x; - ioctl(whichzap, DAHDI_GETEVENT, &x); + ioctl(whichdahdi, DAHDI_GETEVENT, &x); goto retry; } @@ -782,11 +782,11 @@ static int do_set(char *configfilename) while (res != EOF) { struct wctdm_echo_coefs mycoefs; - char completezappath[56] = ""; - int myzap,myacim,mycoef1,mycoef2,mycoef3,mycoef4,mycoef5,mycoef6,mycoef7,mycoef8; + char completedahdipath[56] = ""; + int mydahdi,myacim,mycoef1,mycoef2,mycoef3,mycoef4,mycoef5,mycoef6,mycoef7,mycoef8; - res = fscanf(fp, "%d=%d,%d,%d,%d,%d,%d,%d,%d,%d",&myzap,&myacim,&mycoef1, + res = fscanf(fp, "%d=%d,%d,%d,%d,%d,%d,%d,%d,%d",&mydahdi,&myacim,&mycoef1, &mycoef2,&mycoef3,&mycoef4,&mycoef5,&mycoef6,&mycoef7, &mycoef8); @@ -800,7 +800,7 @@ static int do_set(char *configfilename) OUT_OF_BOUNDS(mycoef4)|| OUT_OF_BOUNDS(mycoef5)|| OUT_OF_BOUNDS(mycoef6)|| OUT_OF_BOUNDS(mycoef7)|| OUT_OF_BOUNDS(mycoef8)) { - fprintf(stdout, "Bounds check error on inputs from %s:%d\n", configfile, myzap); + fprintf(stdout, "Bounds check error on inputs from %s:%d\n", configfile, mydahdi); return -1; } @@ -814,16 +814,16 @@ static int do_set(char *configfilename) mycoefs.coef7 = mycoef7; mycoefs.coef8 = mycoef8; - snprintf(completezappath, sizeof(completezappath), "%s/%d", zappath, myzap); - fd = open(completezappath, O_RDWR); + snprintf(completedahdipath, sizeof(completedahdipath), "%s/%d", dahdipath, mydahdi); + fd = open(completedahdipath, O_RDWR); if (fd < 0) { - fprintf(stdout, "open error on %s: %s\n", completezappath, strerror(errno)); + fprintf(stdout, "open error on %s: %s\n", completedahdipath, strerror(errno)); return -1; } if (ioctl(fd, WCTDM_SET_ECHOTUNE, &mycoefs)) { - fprintf(stdout, "%s: %s\n", completezappath, strerror(errno)); + fprintf(stdout, "%s: %s\n", completedahdipath, strerror(errno)); return -1; } @@ -856,18 +856,18 @@ static int do_dump(int startdev, char* dialstr, int delayuntilsilence, int silen { int res = 0; int fd; - char zapdev[80] = ""; + char dahdidev[80] = ""; - int zapmodule = startdev; - snprintf(zapdev, sizeof(zapdev), "%s/%d", zappath, zapmodule); + int dahdimodule = startdev; + snprintf(dahdidev, sizeof(dahdidev), "%s/%d", dahdipath, dahdimodule); - fd = open(zapdev, O_RDWR); + fd = open(dahdidev, O_RDWR); if (fd < 0) { - fprintf(stdout, "%s absent: %s\n", zapdev, strerror(errno)); + fprintf(stdout, "%s absent: %s\n", dahdidev, strerror(errno)); return -1; } - fprintf(stdout, "Dumping module %s\n", zapdev); + fprintf(stdout, "Dumping module %s\n", dahdidev); res = maptone(fd, waveformtype, dialstr, delayuntilsilence); close(fd); @@ -905,7 +905,7 @@ static int do_calibrate(int startdev, int enddev, int calibtype, char* configfil int res = 0; int configfd, fd; int devno = 0; - char zapdev[80] = ""; + char dahdidev[80] = ""; struct wctdm_echo_coefs coefs; configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY, 0666); @@ -916,15 +916,15 @@ static int do_calibrate(int startdev, int enddev, int calibtype, char* configfil } for (devno = startdev; devno <= enddev; devno++) { - snprintf(zapdev, sizeof(zapdev), "%s/%d", zappath, devno); + snprintf(dahdidev, sizeof(dahdidev), "%s/%d", dahdipath, devno); - fd = open(zapdev, O_RDWR); + fd = open(dahdidev, O_RDWR); if (fd < 0) { - fprintf(stdout, "%s absent: %s\n", zapdev, strerror(errno)); + fprintf(stdout, "%s absent: %s\n", dahdidev, strerror(errno)); continue; } - fprintf(stdout, "Tuning module %s\n", zapdev); + fprintf(stdout, "Tuning module %s\n", dahdidev); if (1 == calibtype) res = acim_tune(fd, dialstr, delayuntilsilence, silencegoodfor, &coefs); diff --git a/fxstest.c b/fxstest.c index 4b0057d..19ed7aa 100644 --- a/fxstest.c +++ b/fxstest.c @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) int res; int x; if (argc < 3) { - fprintf(stderr, "Usage: fxstest \n" + fprintf(stderr, "Usage: fxstest \n" " where cmd is one of:\n" " stats - reports voltages\n" " regdump - dumps ProSLIC registers\n" -- cgit v1.2.3