summaryrefslogtreecommitdiff
path: root/xpp/utils/genzaptelconf
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 20:12:57 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 20:12:57 +0000
commit8f6b8a71f07e128f44d8301f1e6693848f84f9cd (patch)
treed86bbab6abc3a08d679ffe1b76e5b4ec2954c204 /xpp/utils/genzaptelconf
parent353612671a1cd1b8ad6ecd26d38c21af18ba17c3 (diff)
Fixes for 2.6.8 compilation:
* Replace the completion variable with two atomic counters and a wait queue the xbus_poll() code is revamped to use this. * genzaptelconf: Adapt to different module parameter location in sysfs . git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1416 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/genzaptelconf')
-rwxr-xr-xxpp/utils/genzaptelconf10
1 files changed, 9 insertions, 1 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index 79c1b66..d69b710 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -456,8 +456,16 @@ unload_modules() {
# sleep a while until the xpp modules fully register
wait_for_xpp() {
+ case "`uname -r`" in
+ 2.6.8*)
+ autoreg="/sys/module/xpp/zap_autoreg"
+ ;;
+ *)
+ autoreg="/sys/module/xpp/parameters/zap_autoreg"
+ ;;
+ esac
if [ -d /proc/xpp ] && \
- [ "`cat /sys/module/xpp/parameters/zap_autoreg`" = 'Y' ]
+ [ "`cat $autoreg`" = 'Y' ]
then
# wait for the XPDs to register:
# TODO: improve error reporting and produce a messagee here