diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 19:29:02 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 19:29:02 +0000 |
commit | 7e7baddc41682abc4b4499c146da8071c9c8be6a (patch) | |
tree | 49bdc0326ec9337f9d2f143c140e4d19f082dd7e /ztdummy.c | |
parent | 137232a7cd5ffdaa93b813895369901f426e92d0 (diff) |
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 .
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3035 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztdummy.c')
-rw-r--r-- | ztdummy.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -82,18 +82,16 @@ static struct ztdummy *ztd; 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 @@ static struct timer_list timer; #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; @@ -120,6 +119,9 @@ extern uhci_t **uhci_devices; #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 static void update_rtc_rate(struct ztdummy *ztd) @@ -201,7 +203,7 @@ static int ztdummy_initialize(struct ztdummy *ztd) { /* 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; |