1
# Adds an extra Zaptel span method: proc_read.
2
# This allows a span to add some arbitrary text at the end
3
# of the /proc/zaptel/NNN file.
5
# This is currently only used by cwain.
7
# My personal opinion is that such methods are not recommended.
8
# sysfs support should be used instead (Tzafrir). It is likely to break
9
# zapconf and genzaptelconf for drivers using it.
11
Index: zaptel-1.2.22/kernel/zaptel.h
12
===================================================================
13
--- zaptel-1.2.22.orig/kernel/zaptel.h 2007-12-04 10:40:30.000000000 +0100
14
+++ zaptel-1.2.22/kernel/zaptel.h 2007-12-04 14:35:14.545043151 +0100
15
@@ -1394,6 +1405,10 @@
19
+#ifdef CONFIG_PROC_FS
20
+ /* Allow subordinate drivers to print out their own stuff */
21
+ int (*proc_read)(struct zt_span *span, char *start);
25
struct zt_transcoder_channel {
26
Index: zaptel-1.2.22/kernel/zaptel-base.c
27
===================================================================
28
--- zaptel-1.2.22.orig/kernel/zaptel-base.c 2007-12-04 10:40:31.000000000 +0100
29
+++ zaptel-1.2.22/kernel/zaptel-base.c 2007-12-04 14:35:14.553042850 +0100
31
len += sprintf(page + len, "\tIRQ misses: %d\n", spans[span]->irqmisses);
32
len += sprintf(page + len, "\n");
34
+ if (spans[span]->proc_read) {
35
+ len += spans[span]->proc_read(spans[span], page + len);
39
for (x=1;x<ZT_MAX_CHANNELS;x++) {