[dahdi-commits] tzafrir: branch linux/tzafrir/sysfs r8766 - /linux/team/tzafrir/sysfs/drivers...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jun 14 15:19:14 CDT 2010
Author: tzafrir
Date: Mon Jun 14 15:19:10 2010
New Revision: 8766
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8766
Log:
Remove leading '0' from span names
sadly dahdi_cfg parses them with '%i' and considers them octal.
Modified:
linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs-chan.c
linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs.c
Modified: linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs-chan.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs-chan.c?view=diff&rev=8766&r1=8765&r2=8766
==============================================================================
--- linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs-chan.c (original)
+++ linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs-chan.c Mon Jun 14 15:19:10 2010
@@ -221,7 +221,7 @@
/*
* WARNING: the name cannot be longer than KOBJ_NAME_LEN
*/
- dev_set_name(dev, "dahdi!spans!%03d!%d", span->spanno, chan->chanpos);
+ dev_set_name(dev, "dahdi!spans!%d!%d", span->spanno, chan->chanpos);
dev_set_drvdata(dev, chan);
dev->release = chan_release;
res = device_register(dev);
Modified: linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs.c?view=diff&rev=8766&r1=8765&r2=8766
==============================================================================
--- linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs.c (original)
+++ linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-sysfs.c Mon Jun 14 15:19:10 2010
@@ -73,7 +73,7 @@
#define SPAN_VAR_BLOCK \
do { \
DAHDI_ADD_UEVENT_VAR("DAHDI_INIT_DIR=%s", initdir); \
- DAHDI_ADD_UEVENT_VAR("SPAN_NUM=%03d", span->spanno); \
+ DAHDI_ADD_UEVENT_VAR("SPAN_NUM=%d", span->spanno); \
DAHDI_ADD_UEVENT_VAR("SPAN_NAME=%s", span->name); \
} while (0)
@@ -200,7 +200,7 @@
struct dahdi_span *span;
span = dev_to_span(dev);
- return sprintf(buf, "%03d\t%d/%d\t%s\n",
+ return sprintf(buf, "%d\t%d/%d\t%s\n",
span->spanno,
configured_channels(span),
span->channels,
@@ -237,7 +237,7 @@
span_dbg(DEVICES, span, "Span wait user interrupted\n");
return -ERESTARTSYS;
}
- return sprintf(buf, "%03d\t%d/%d\t%s\n",
+ return sprintf(buf, "%d\t%d/%d\t%s\n",
span->spanno,
configured_channels(span),
span->channels,
@@ -382,7 +382,7 @@
span_device->parent = (span->parent_device)
? span->parent_device
: NULL;
- dev_set_name(span_device, "span-%03d", span->spanno);
+ dev_set_name(span_device, "span-%d", span->spanno);
dev_set_drvdata(span_device, span);
span_device->release = span_release;
res = device_register(span_device);
More information about the dahdi-commits
mailing list