2.5.1-pre8 -- fix to compile nfs as module
Subsystems (2)
Attached is a patch to allow nfs to compile as a module. Please check it out as I just:
exported symbols from fs/seq_file.c
added the seq_file.o to the obj-exports in the VFS Makefile and added an ifdef for modversions in fs/nfs/inode.c.
Craig.
fs/Makefile +1 -1
@@ -7,7 +7,7 @@ O_TARGET := fs.o -export-objs := filesystems.o open.o dcache.o buffer.o bio.o +export-objs := filesystems.o open.o dcache.o buffer.o bio.o seq_file.o mod-subdirs := nls obj-y := open.o read_write.o devices.o file_table.o buffer.o \
fs/nfs/inode.c +5 -0
@@ -15,6 +15,11 @@#include <linux/config.h> #include <linux/module.h> + +#ifdef MODVERSIONS +#include <linux/modversions.h> +#endif +#include <linux/init.h> #include <linux/sched.h>
fs/seq_file.c +7 -0
@@ -8,6 +8,7 @@#include <linux/fs.h> #include <linux/seq_file.h> #include <linux/slab.h> +#include <linux/module.h> #include <asm/uaccess.h>
@@ -293,3 +294,9 @@ m->count = m->size;return -1 ; } +EXPORT_SYMBOL (seq_printf); +EXPORT_SYMBOL (seq_escape); +EXPORT_SYMBOL (seq_release); +EXPORT_SYMBOL (seq_lseek); +EXPORT_SYMBOL (seq_open); +EXPORT_SYMBOL (seq_read);
include/linux/seq_file.h +6 -6
@@ -26,11 +26,11 @@int (*show) (struct seq_file *m,void *v); }; -int seq_open (struct file *,struct seq_operations *); -ssize_t seq_read (struct file *,char *,size_t ,loff_t *); -loff_t seq_lseek (struct file *,loff_t ,int ); -int seq_release (struct inode *,struct file *); -int seq_escape (struct seq_file *,const char *,const char *); +extern int seq_open (struct file *,struct seq_operations *); +extern ssize_t seq_read (struct file *,char *,size_t ,loff_t *); +extern loff_t seq_lseek (struct file *,loff_t ,int ); +extern int seq_release (struct inode *,struct file *); +extern int seq_escape (struct seq_file *,const char *,const char *);static inline int seq_putc (struct seq_file *m,char c) {
@@ -53,7 +53,7 @@ return -1; } -int seq_printf (struct seq_file *,const char *, ...) +extern int seq_printf (struct seq_file *,const char *, ...) __attribute__ ((format (printf,2 ,3 )));#endif
Quoted 1 line · Craig Christophel
added an ifdef for modversions in
fs/nfs/inode.c.
Don't! The Makefile automatically adds modversions.h when required, any code that explicitly includes modversions.h is broken.
Thanks for the tip..... I thought that could be incorrect.
well here is an updated patch without the modversions stuff.
Craig.
Quoted 5 lines · Keith Owens
On Tue, 11 Dec 2001 08:19:35 -0500,
Quoted 1 line · Craig Christophel
added an ifdef for modversions in
fs/nfs/inode.c.
Quoted 8 lines
Don't! The
Makefileautomatically addsmodversions.hwhen required, any code that explicitly includesmodversions.his broken.-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
fs/Makefile +1 -1
@@ -7,7 +7,7 @@ O_TARGET := fs.o -export-objs := filesystems.o open.o dcache.o buffer.o bio.o +export-objs := filesystems.o open.o dcache.o buffer.o bio.o seq_file.o mod-subdirs := nls obj-y := open.o read_write.o devices.o file_table.o buffer.o \
fs/seq_file.c +7 -0
@@ -8,6 +8,7 @@#include <linux/fs.h> #include <linux/seq_file.h> #include <linux/slab.h> +#include <linux/module.h> #include <asm/uaccess.h>
@@ -293,3 +294,9 @@ m->count = m->size;return -1 ; } +EXPORT_SYMBOL (seq_printf); +EXPORT_SYMBOL (seq_escape); +EXPORT_SYMBOL (seq_release); +EXPORT_SYMBOL (seq_lseek); +EXPORT_SYMBOL (seq_open); +EXPORT_SYMBOL (seq_read);
include/linux/seq_file.h +6 -6
@@ -26,11 +26,11 @@int (*show) (struct seq_file *m,void *v); }; -int seq_open (struct file *,struct seq_operations *); -ssize_t seq_read (struct file *,char *,size_t ,loff_t *); -loff_t seq_lseek (struct file *,loff_t ,int ); -int seq_release (struct inode *,struct file *); -int seq_escape (struct seq_file *,const char *,const char *); +extern int seq_open (struct file *,struct seq_operations *); +extern ssize_t seq_read (struct file *,char *,size_t ,loff_t *); +extern loff_t seq_lseek (struct file *,loff_t ,int ); +extern int seq_release (struct inode *,struct file *); +extern int seq_escape (struct seq_file *,const char *,const char *);static inline int seq_putc (struct seq_file *m,char c) {
@@ -53,7 +53,7 @@ return -1; } -int seq_printf (struct seq_file *,const char *, ...) +extern int seq_printf (struct seq_file *,const char *, ...) __attribute__ ((format (printf,2 ,3 )));#endif