diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-10-30 19:05:05 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-10-30 19:05:05 +0000 |
commit | bdca9e3129ee75c6371f3e339765bc0606a1ccb2 (patch) | |
tree | 77a2836ce2ed414bf8a285806975a2fa71bfbf88 /drivers/dahdi/dahdi-base.c | |
parent | 4f4266e27f7e59d9e742955bfe63eb1768be4cf6 (diff) |
Use ! to hint udev about directory separator.
Udev knows how to convert a '!' in the device name to a directory
separator. Thus the name 'dahdi!ctl' will create the device
/dev/dahdi/ctl .
We still keep older udev rules in this release for compatibility, but
eventually we'll only need them to set permissions.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5179 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi-base.c')
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index d322142..4383435 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -5388,7 +5388,7 @@ int dahdi_register(struct dahdi_span *span, int prefmaster) for (x = 0; x < span->channels; x++) { if (span->chans[x]->channo < 250) { char chan_name[32]; - snprintf(chan_name, sizeof(chan_name), "dahdi%d", + snprintf(chan_name, sizeof(chan_name), "dahdi!%d", span->chans[x]->channo); CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, span->chans[x]->channo), NULL, chan_name); @@ -7828,7 +7828,7 @@ int dahdi_register_chardev(struct dahdi_chardev *dev) { char udevname[strlen(dev->name) + 3]; - strcpy(udevname, "dahdi"); + strcpy(udevname, "dahdi!"); strcat(udevname, dev->name); CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname); @@ -7856,10 +7856,10 @@ static int __init dahdi_init(void) } dahdi_class = class_create(THIS_MODULE, "dahdi"); - 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"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 253), NULL, "dahdi!timer"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 254), NULL, "dahdi!channel"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 255), NULL, "dahdi!pseudo"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 0), NULL, "dahdi!ctl"); module_printk(KERN_INFO, "Telephony Interface Registered on major %d\n", DAHDI_MAJOR); module_printk(KERN_INFO, "Version: %s\n", DAHDI_VERSION); |