patch-2.0.34 linux/fs/fat/fatfs_syms.c

Next file: linux/fs/fat/file.c
Previous file: linux/fs/fat/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.33/linux/fs/fat/fatfs_syms.c linux/fs/fat/fatfs_syms.c
@@ -4,55 +4,65 @@
  * Exported kernel symbols for the low-level FAT-based fs support.
  *
  */
+#define ASC_LINUX_VERSION(V, P, S)	(((V) * 65536) + ((P) * 256) + (S))
+#include <linux/version.h>
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/mm.h>
 #include <linux/msdos_fs.h>
 
 #include "msbuffer.h"
-#include "tables.h"
 
 extern struct file_operations fat_dir_operations;
 
+#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
+#define X(sym) EXPORT_SYMBOL(sym);
+#define X_PUNCT ;
+#else
+#define X_PUNCT ,
 static struct symbol_table fat_syms = {
 #include <linux/symtab_begin.h>
-	X(fat_a2alias),
-	X(fat_a2uni),
-	X(fat_add_cluster),
-	X(fat_bmap),
-	X(fat_brelse),
-	X(fat_cache_inval_inode),
-	X(fat_code2uni),
-	X(fat_date_unix2dos),
-	X(fat_dir_operations),
-	X(fat_file_read),
-	X(fat_file_write),
-	X(fat_fs_panic),
-	X(fat_get_entry),
-	X(fat_lock_creation),
-	X(fat_mark_buffer_dirty),
-	X(fat_mmap),
-	X(fat_notify_change),
-	X(fat_parent_ino),
-	X(fat_put_inode),
-	X(fat_put_super),
-	X(fat_read_inode),
-	X(fat_read_super),
-	X(fat_readdirx),
-	X(fat_readdir),
-	X(fat_scan),
-	X(fat_smap),
-	X(fat_statfs),
-	X(fat_truncate),
-	X(fat_uni2asc_pg),
-	X(fat_uni2code),
-	X(fat_unlock_creation),
-	X(fat_write_inode),
+#endif
+X(fat_add_cluster) X_PUNCT
+X(fat_bmap) X_PUNCT
+X(fat_brelse) X_PUNCT
+X(fat_cache_inval_inode) X_PUNCT
+X(fat_esc2uni) X_PUNCT
+X(fat_date_unix2dos) X_PUNCT
+X(fat_dir_operations) X_PUNCT
+X(fat_file_read) X_PUNCT
+X(fat_file_write) X_PUNCT
+X(fat_fs_panic) X_PUNCT
+X(fat_get_entry) X_PUNCT
+X(fat_lock_creation) X_PUNCT
+X(fat_mark_buffer_dirty) X_PUNCT
+X(fat_mmap) X_PUNCT
+X(fat_notify_change) X_PUNCT
+X(fat_parent_ino) X_PUNCT
+X(fat_put_inode) X_PUNCT
+X(fat_put_super) X_PUNCT
+X(fat_read_inode) X_PUNCT
+X(fat_read_super) X_PUNCT
+X(fat_readdirx) X_PUNCT
+X(fat_readdir) X_PUNCT
+X(fat_scan) X_PUNCT
+X(fat_smap) X_PUNCT
+X(fat_statfs) X_PUNCT
+X(fat_truncate) X_PUNCT
+X(fat_uni2esc) X_PUNCT
+X(fat_unlock_creation) X_PUNCT
+X(fat_write_inode) X_PUNCT
+#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
 #include <linux/symtab_end.h>
 };                                           
+#endif
 
 int init_fat_fs(void)
 {
+#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
+	return 0;
+#else
 	return register_symtab(&fat_syms);
+#endif
 }
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov