[svn-commits] tzafrir: branch 1.4 r3035 - /branches/1.4/ztdummy.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Sep 15 14:29:03 CDT 2007


Author: tzafrir
Date: Sat Sep 15 14:29:02 2007
New Revision: 3035

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3035
Log:
Include the type of the ztdummy module in the desc (span description)
filed.

To check what type of module you built, use: 

  strings ztdummy.ko | grep type
  tr '%' '\n' <ztdummy.ko | grep -a type:

Or look at the span title line in /proc/zaptel .

Modified:
    branches/1.4/ztdummy.c

Modified: branches/1.4/ztdummy.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/ztdummy.c?view=diff&rev=3035&r1=3034&r2=3035
==============================================================================
--- branches/1.4/ztdummy.c (original)
+++ branches/1.4/ztdummy.c Sat Sep 15 14:29:02 2007
@@ -82,18 +82,16 @@
 
 static int debug = 0;
 
-#if defined(LINUX26) && defined(USE_RTC)
+#ifdef LINUX26
+#ifdef USE_RTC
+#define ZTDUMMY_TYPE "RTC"
 static int rtc_rate = 0;
 static int current_rate = 0;
 static int taskletpending = 0;
 static struct tasklet_struct ztd_tlet;
 static void ztd_tasklet(unsigned long data);
-#endif
-
-#ifdef LINUX26
-#define ZAPTEL_RATE 1000                     /* zaptel ticks per second */
-#define ZAPTEL_TIME (1000000 / ZAPTEL_RATE)  /* zaptel tick time in us */
-#ifndef USE_RTC
+#else /* ifndef USE_RTC */
+#define ZTDUMMY_TYPE "Linux26"
 /* New 2.6 kernel timer stuff */
 static struct timer_list timer;
 #endif
@@ -101,6 +99,7 @@
 #if LINUX_VERSION_CODE < VERSION_CODE(2,4,5)
 #  error "This kernel is too old: not supported by this file"
 #endif
+#define ZTDUMMY_TYPE "UHCI"
 /* Old UCHI stuff */
 static    uhci_desc_t  *td;
 static    uhci_t *s;
@@ -119,6 +118,9 @@
 
 #endif
 
+
+#define ZAPTEL_RATE 1000                     /* zaptel ticks per second */
+#define ZAPTEL_TIME (1000000 / ZAPTEL_RATE)  /* zaptel tick time in us */
 
 #ifdef LINUX26
 #ifdef USE_RTC
@@ -201,7 +203,7 @@
 {
 	/* Zapata stuff */
 	sprintf(ztd->span.name, "ZTDUMMY/1");
-	sprintf(ztd->span.desc, "%s %d", ztd->span.name, 1);
+	sprintf(ztd->span.desc, "%s (type: " ZTDUMMY_TYPE ") %d", ztd->span.name, 1);
 	sprintf(ztd->chan.name, "ZTDUMMY/%d/%d", 1, 0);
 	ztd->chan.chanpos = 1;
 	ztd->span.chans = &ztd->chan;




More information about the svn-commits mailing list