Skip to contentSkip to conversation

seq_open, et. al. are not exported for modules

PATCH Tommy Reynolds 1 participant 2 messages Nov 29, 2001

lore
Share & tools
lore
#0 lore raw

Alex,

The patch below, relative to 2.4.16, exports the seq_FOO symbols so they can be used from a loadable kernel module.

BTW: could the "kmalloc()" calls be safely changed to "vmalloc()"?

kernel/ksyms.c renamed from kernel/ksyms.c.orig +9 -0
@@ -46,6 +46,7 @@
 #include <linux/tty.h>
 #include <linux/in6.h>
 #include <linux/completion.h>
+#include <linux/seq_file.h>
 #include <asm/checksum.h>
 
 #if defined(CONFIG_PROC_FS)
@@ -559,3 +560,11 @@ EXPORT_SYMBOL(init_task_union);
 
 EXPORT_SYMBOL(tasklist_lock);
 EXPORT_SYMBOL(pidhash);
+
+/* Sequential file systems */
+
+EXPORT_SYMBOL(seq_open);
+EXPORT_SYMBOL(seq_read);
+EXPORT_SYMBOL(seq_lseek);
+EXPORT_SYMBOL(seq_release);
+EXPORT_SYMBOL(seq_escape);

---------------------------------------------+-----------------------------

Tommy Reynolds                               | mailto: <[email protected]>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923
#1 lore raw
Quoted 4 lines · Tommy Reynolds

Alex,

The patch below, relative to 2.4.16, exports the seq_FOO symbols so they can be used from a loadable kernel module.

The patch omitted "seq_printf" ;-(

This one doesn't:

kernel/ksyms.c renamed from kernel/ksyms.c.orig +10 -0
@@ -46,6 +46,7 @@
 #include <linux/tty.h>
 #include <linux/in6.h>
 #include <linux/completion.h>
+#include <linux/seq_file.h>
 #include <asm/checksum.h>
 
 #if defined(CONFIG_PROC_FS)
@@ -559,3 +560,12 @@ EXPORT_SYMBOL(init_task_union);
 
 EXPORT_SYMBOL(tasklist_lock);
 EXPORT_SYMBOL(pidhash);
+
+/* Sequential file systems */
+
+EXPORT_SYMBOL(seq_open);
+EXPORT_SYMBOL(seq_read);
+EXPORT_SYMBOL(seq_lseek);
+EXPORT_SYMBOL(seq_release);
+EXPORT_SYMBOL(seq_escape);
+EXPORT_SYMBOL(seq_printf);

---------------------------------------------+-----------------------------

Tommy Reynolds                               | mailto: <[email protected]>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923