summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile31
-rwxr-xr-xbuild_tools/genudevrules18
-rw-r--r--drivers/dahdi/dahdi-base.c18
3 files changed, 32 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 3deb490..6da7fc7 100644
--- a/Makefile
+++ b/Makefile
@@ -48,10 +48,7 @@ endif
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
# if it is enabled in the kernel.
-ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
- DYNFS=yes
- UDEVRULES=yes
-endif
+
ifeq (yes,$(HAS_KSRC))
HOTPLUG_FIRMWARE:=$(shell if grep -q '^CONFIG_FW_LOADER=[ym]' $(KCONFIG); then echo "yes"; else echo "no"; fi)
endif
@@ -61,24 +58,28 @@ MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
KMAKE = $(MAKE) -C $(KSRC) ARCH=$(ARCH) SUBDIRS=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
KMAKE_INST = $(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install
+ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
+ DYNFS=yes
+endif
+
ROOT_PREFIX=
CHKCONFIG := $(wildcard /sbin/chkconfig)
UPDATE_RCD := $(wildcard /usr/sbin/update-rc.d)
ifeq (,$(DESTDIR))
ifneq (,$(CHKCONFIG))
- ADD_INITD := $(CHKCONFIG) --add zaptel
+ ADD_INITD := $(CHKCONFIG) --add dahdi
else
ifndef (,$(UPDATE_RCD))
- ADD_INITD := $(UPDATE_RCD) zaptel defaults 15 30
+ ADD_INITD := $(UPDATE_RCD) dahdi defaults 15 30
endif
endif
endif
INITRD_DIR := $(firstword $(wildcard /etc/rc.d/init.d /etc/init.d))
ifneq (,$(INITRD_DIR))
- INIT_TARGET := $(DESTDIR)$(INITRD_DIR)/zaptel
- COPY_INITD := install -D zaptel.init $(INIT_TARGET)
+ INIT_TARGET := $(DESTDIR)$(INITRD_DIR)/dahdi
+ COPY_INITD := install -D dahdi.init $(INIT_TARGET)
endif
RCCONF_DIR := $(firstword $(wildcard /etc/sysconfig /etc/default))
@@ -128,7 +129,7 @@ install: all devices install-modules install-firmware install-include
@echo "###################################################"
install-modconf:
- build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
+ build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out dahdi dahdi_dummy xpp dahdi_transcode dahdi_dynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
@if [ -d /etc/modutils ]; then \
/sbin/update-modules ; \
fi
@@ -166,12 +167,8 @@ ifneq (yes,$(DYNFS))
N=$$[$$N+1]; \
done
else # DYNFS
- ifneq (yes,$(UDEVRULES)) #!UDEVRULES
- @echo "**** Dynamic filesystem detected -- not creating device nodes"
- else # UDEVRULES
install -d $(DESTDIR)/etc/udev/rules.d
- build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules
- endif
+ build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/dahdi.rules
endif
install-udev: devices
@@ -191,8 +188,8 @@ ifneq (,$(COPY_INITD))
$(COPY_INITD)
endif
ifneq (,$(RCCONF_DIR))
- ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
- $(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
+ ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/dahdi))
+ $(INSTALL) -D -m 644 dahdi.sysconfig $(DESTDIR)$(RCCONF_DIR)/dahdi
endif
endif
ifneq (,$(COPY_NETSCR))
@@ -208,7 +205,7 @@ endif
@echo "optimal value for the variable MODULES."
@echo ""
@echo "I think that the DAHDI hardware you have on your system is:"
- @kernel/xpp/utils/zaptel_hardware || true
+ @kernel/xpp/utils/dahdi_hardware || true
update:
@if [ -d .svn ]; then \
diff --git a/build_tools/genudevrules b/build_tools/genudevrules
index 17e1f90..0b5eec2 100755
--- a/build_tools/genudevrules
+++ b/build_tools/genudevrules
@@ -21,15 +21,15 @@ else
fi
cat <<EOF
-# udev rules to generate the /dev/zap device files (if not yet provided
+# udev rules to generate the /dev/dahdi device files (if not yet provided
# by your distribution):
-KERNEL${match}"zapctl", NAME="zap/ctl"
-KERNEL${match}"zaptranscode", NAME="zap/transcode"
-KERNEL${match}"zaptimer", NAME="zap/timer"
-KERNEL${match}"zapchannel", NAME="zap/channel"
-KERNEL${match}"zappseudo", NAME="zap/pseudo"
-KERNEL${match}"zap[0-9]*", NAME="zap/%n"
+KERNEL${match}"dahdictl", NAME="dahdi/ctl"
+KERNEL${match}"dahditranscode", NAME="dahdi/transcode"
+KERNEL${match}"dahditimer", NAME="dahdi/timer"
+KERNEL${match}"dahdichannel", NAME="dahdi/channel"
+KERNEL${match}"dahdipseudo", NAME="dahdi/pseudo"
+KERNEL${match}"dahdi[0-9]*", NAME="dahdi/%n"
-# zaptel devices with ownership/permissions for running as non-root
-SUBSYSTEM${match}"zaptel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+# DAHDI devices with ownership/permissions for running as non-root
+SUBSYSTEM${match}"dahdi", OWNER="asterisk", GROUP="asterisk", MODE="0660"
EOF
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 6bb7b93..b0fd8c4 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -1330,7 +1330,7 @@ static int dahdi_net_open(hdlc_device *hdlc)
netif_start_queue(ztchan_to_dev(ms));
#ifdef CONFIG_DAHDI_DEBUG
- printk("ZAPNET: Opened channel %d name %s\n", ms->channo, ms->name);
+ printk("DAHDINET: Opened channel %d name %s\n", ms->channo, ms->name);
#endif
return 0;
}
@@ -2263,7 +2263,7 @@ static int dahdi_timer_release(struct inode *inode, struct file *file)
}
spin_unlock_irqrestore(&zaptimerlock, flags);
if (!cur) {
- printk("Zap Timer: Not on list??\n");
+ printk("DAHDI Timer: Not on list??\n");
return 0;
}
kfree(t);
@@ -2336,7 +2336,7 @@ static struct dahdi_chan *dahdi_alloc_pseudo(void)
{
struct dahdi_chan *pseudo;
unsigned long flags;
- /* Don't allow /dev/zap/pseudo to open if there are no spans */
+ /* Don't allow /dev/dahdi/pseudo to open if there are no spans */
if (maxspans < 1)
return NULL;
pseudo = kmalloc(sizeof(struct dahdi_chan), GFP_KERNEL);
@@ -4983,7 +4983,7 @@ int dahdi_register(struct dahdi_span *span, int prefmaster)
for (x = 0; x < span->channels; x++) {
char chan_name[50];
if (span->chans[x].channo < 250) {
- sprintf(chan_name, "zap%d", span->chans[x].channo);
+ sprintf(chan_name, "dahdi%d", span->chans[x].channo);
CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, span->chans[x].channo), NULL, chan_name);
}
}
@@ -7417,7 +7417,7 @@ int dahdi_register_chardev(struct dahdi_chardev *dev)
#ifdef CONFIG_DAHDI_UDEV
char udevname[strlen(dev->name) + 3];
- strcpy(udevname, "zap");
+ strcpy(udevname, "dahdi");
strcat(udevname, dev->name);
CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname);
#endif /* CONFIG_DAHDI_UDEV */
@@ -7443,10 +7443,10 @@ static int __init dahdi_init(void) {
#ifdef CONFIG_DAHDI_UDEV /* udev support functions */
dahdi_class = class_create(THIS_MODULE, "dahdi");
- CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 253), NULL, "zaptimer");
- CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 254), NULL, "zapchannel");
- CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 255), NULL, "zappseudo");
- CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 0), NULL, "zapctl");
+ CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 253), NULL, "dahditimer");
+ CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 254), NULL, "dahdichannel");
+ CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 255), NULL, "dahdipseudo");
+ CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 0), NULL, "dahdictl");
#endif /* CONFIG_DAHDI_UDEV */
if ((res = register_chrdev(DAHDI_MAJOR, "dahdi", &dahdi_fops))) {