diff -urN linux-2.4.0t4/drivers/char/ftape/compressor/zftape-compress.c linux/drivers/char/ftape/compressor/zftape-compress.c --- linux-2.4.0t4/drivers/char/ftape/compressor/zftape-compress.c Tue Nov 23 13:29:15 1999 +++ linux/drivers/char/ftape/compressor/zftape-compress.c Thu Jul 13 21:06:22 2000 @@ -34,14 +34,8 @@ #include #include #include - #include - -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6) #include -#else -#include -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h" @@ -271,15 +265,9 @@ static void zftc_lock(void) { -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) - if (!MOD_IN_USE) { - MOD_INC_USE_COUNT; - } -#else MOD_INC_USE_COUNT; /* sets MOD_VISITED and MOD_USED_ONCE, * locking is done with can_unload() */ -#endif keep_module_locked = 1; } @@ -291,11 +279,6 @@ memset((void *)&cseg, '\0', sizeof(cseg)); zftc_stats(); -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) - if (MOD_IN_USE) { - MOD_DEC_USE_COUNT; - } -#endif keep_module_locked = 0; TRACE_EXIT; } @@ -570,15 +553,9 @@ TRACE_FUN(ft_t_flow); keep_module_locked = 1; -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) MOD_INC_USE_COUNT; /* sets MOD_VISITED and MOD_USED_ONCE, * locking is done with can_unload() */ -#else - if (!MOD_IN_USE) { - MOD_INC_USE_COUNT; - } -#endif /* Note: we do not unlock the module because * there are some values cached in that `cseg' variable. We * don't don't want to use this information when being @@ -618,17 +595,10 @@ * block. We know, that the compression buffer is * empty (else there wouldn't be any space left). */ -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_from_user(zftc_scratch_buf, src_buf + result, volume->blk_sz) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, src_buf + result, - volume->blk_sz),); - memcpy_fromfs(zftc_scratch_buf, src_buf + result, - volume->blk_sz); -#endif req_len_left -= volume->blk_sz; cseg.cmpr_sz = zft_compress(zftc_scratch_buf, volume->blk_sz, zftc_buf); @@ -704,15 +674,9 @@ TRACE_FUN(ft_t_flow); keep_module_locked = 1; -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) MOD_INC_USE_COUNT; /* sets MOD_VISITED and MOD_USED_ONCE, * locking is done with can_unload() */ -#else - if (!MOD_IN_USE) { - MOD_INC_USE_COUNT; - } -#endif TRACE_CATCH(zft_allocate_cmpr_mem(volume->blk_sz),); if (pos->seg_byte_pos == 0) { /* new segment just read @@ -746,16 +710,11 @@ "Uncompressed blk (%d) != blk size (%d)", uncompressed_sz, volume->blk_sz); } -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_to_user(dst_buf + result, zftc_scratch_buf, uncompressed_sz) != 0 ) { TRACE_EXIT -EFAULT; } -#else - memcpy_tofs(dst_buf + result, zftc_scratch_buf, - uncompressed_sz); -#endif remaining -= uncompressed_sz; result += uncompressed_sz; cseg.cmpr_pos = 0; @@ -839,15 +798,9 @@ TRACE_FUN(ft_t_flow); keep_module_locked = 1; -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) MOD_INC_USE_COUNT; /* sets MOD_VISITED and MOD_USED_ONCE, * locking is done with can_unload() */ -#else - if (!MOD_IN_USE) { - MOD_INC_USE_COUNT; - } -#endif if (new_block_pos == 0) { pos->seg_pos = volume->start_seg; pos->seg_byte_pos = 0; @@ -1260,19 +1213,15 @@ #ifdef MODULE -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) MODULE_AUTHOR( "(c) 1996, 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de"); MODULE_DESCRIPTION( "Compression routines for zftape. Uses the lzrw3 algorithm by Ross Williams"); -#endif -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) static int can_unload(void) { return keep_module_locked ? -EBUSY : 0; } -#endif /* Called by modules package when installing the driver */ @@ -1280,14 +1229,10 @@ { int result; -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) - register_symtab(0); /* remove global ftape symbols */ -#else if (!mod_member_present(&__this_module, can_unload)) return -EBUSY; __this_module.can_unload = can_unload; EXPORT_NO_SYMBOLS; -#endif result = zft_compressor_init(); keep_module_locked = 0; return result; diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/fdc-io.c linux/drivers/char/ftape/lowlevel/fdc-io.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/fdc-io.c Tue Nov 23 13:29:15 1999 +++ linux/drivers/char/ftape/lowlevel/fdc-io.c Thu Jul 13 21:06:22 2000 @@ -196,11 +196,7 @@ fdc_usec_wait(FT_RQM_DELAY); /* wait for valid RQM status */ save_flags(flags); cli(); -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,30) if (!in_interrupt()) -#else - if (!intr_count) -#endif /* Yes, I know, too much comments inside this function * ... * @@ -264,19 +260,11 @@ } } #endif -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,30) if (!in_interrupt()) { /* shouldn't be cleared if called from isr */ ft_interrupt_seen = 0; } -#else - if (!intr_count) { - /* shouldn't be cleared if called from isr - */ - ft_interrupt_seen = 0; - } -#endif while (count) { result = fdc_write(*cmd_data); if (result < 0) { @@ -392,15 +380,9 @@ TRACE_FUN(ft_t_fdc_dma); -#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16) if (waitqueue_active(&ftape_wait_intr)) { TRACE_ABORT(-EIO, ft_t_err, "error: nested call"); } -#else - if (ftape_wait_intr) { - TRACE_ABORT(-EIO, ft_t_err, "error: nested call"); - } -#endif /* timeout time will be up to USPT microseconds too long ! */ timeout = (1000 * time + FT_USPT - 1) / FT_USPT; diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/fdc-isr.c linux/drivers/char/ftape/lowlevel/fdc-isr.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/fdc-isr.c Tue Nov 25 17:45:27 1997 +++ linux/drivers/char/ftape/lowlevel/fdc-isr.c Thu Jul 13 21:06:22 2000 @@ -1119,11 +1119,7 @@ } ft_seek_completed = 1; fdc_mode = fdc_idle; -#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16) } else if (!waitqueue_active(&ftape_wait_intr)) { -#else - } else if (!ftape_wait_intr) { -#endif if (ft_expected_stray_interrupts == 0) { TRACE(ft_t_warn, "unexpected stray interrupt"); } else { @@ -1154,23 +1150,12 @@ */ if (!ft_hide_interrupt) { ft_interrupt_seen ++; -#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16) if (waitqueue_active(&ftape_wait_intr)) { wake_up_interruptible(&ftape_wait_intr); } -#else - if (ftape_wait_intr) { - wake_up_interruptible(&ftape_wait_intr); - } -#endif } else { -#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16) TRACE(ft_t_flow, "hiding interrupt while %s", waitqueue_active(&ftape_wait_intr) ? "waiting":"active"); -#else - TRACE(ft_t_flow, "hiding interrupt while %s", - ftape_wait_intr ? "waiting" : "active"); -#endif } #ifdef TESTING t0 = ftape_timediff(t0, ftape_timestamp()); diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-ctl.c linux/drivers/char/ftape/lowlevel/ftape-ctl.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-ctl.c Wed Nov 3 14:41:29 1999 +++ linux/drivers/char/ftape/lowlevel/ftape-ctl.c Thu Jul 13 21:06:22 2000 @@ -30,14 +30,9 @@ #include #include #include - #include #include -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6) #include -#else -#include -#endif #include #include "../lowlevel/ftape-tracing.h" diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-init.c linux/drivers/char/ftape/lowlevel/ftape-init.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-init.c Tue Nov 23 13:29:15 1999 +++ linux/drivers/char/ftape/lowlevel/ftape-init.c Thu Jul 13 21:06:22 2000 @@ -29,21 +29,14 @@ #include #include #include - #include -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,16) #include -#else -#define __initdata -#define __initfunc(__arg) __arg -#endif #include #ifdef CONFIG_ZFTAPE #include #endif #include "../lowlevel/ftape-init.h" -#include "../lowlevel/ftape_syms.h" #include "../lowlevel/ftape-io.h" #include "../lowlevel/ftape-read.h" #include "../lowlevel/ftape-write.h" @@ -114,9 +107,6 @@ ft_failure = 1; /* inhibit any operation but open */ ftape_udelay_calibrate(); /* must be before fdc_wait_calibrate ! */ fdc_wait_calibrate(); -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) - register_symtab(&ftape_symbol_table); /* add global ftape symbols */ -#endif #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) (void)ftape_proc_init(); #endif @@ -132,7 +122,6 @@ static int ft_tracing = -1; #endif -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) #define FT_MOD_PARM(var,type,desc) \ MODULE_PARM(var,type); MODULE_PARM_DESC(var,desc) @@ -153,7 +142,6 @@ "(c) 1996, 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)"); MODULE_DESCRIPTION( "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives."); -#endif /* Called by modules package when installing the driver */ diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-setup.c linux/drivers/char/ftape/lowlevel/ftape-setup.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape-setup.c Thu Aug 12 14:53:22 1999 +++ linux/drivers/char/ftape/lowlevel/ftape-setup.c Thu Jul 13 21:06:22 2000 @@ -30,14 +30,9 @@ #include #include #include - #include -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,16) #include -#else -#define __initdata -#define __initfunc(__arg) __arg -#endif + #include "../lowlevel/ftape-tracing.h" #include "../lowlevel/fdc-io.h" diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape_syms.c linux/drivers/char/ftape/lowlevel/ftape_syms.c --- linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape_syms.c Wed May 20 21:54:37 1998 +++ linux/drivers/char/ftape/lowlevel/ftape_syms.c Thu Jul 13 21:06:22 2000 @@ -42,62 +42,55 @@ #include "../lowlevel/ftape-buffer.h" #include "../lowlevel/ftape-format.h" -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) -# define FT_KSYM(sym) EXPORT_SYMBOL(##sym); -#else -# define FT_KSYM(sym) X(##sym), -#endif - -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -struct symbol_table ftape_symbol_table = { -#include -#endif /* bad sector handling from ftape-bsm.c */ -FT_KSYM(ftape_get_bad_sector_entry) -FT_KSYM(ftape_find_end_of_bsm_list) +EXPORT_SYMBOL(ftape_get_bad_sector_entry); +EXPORT_SYMBOL(ftape_find_end_of_bsm_list); + /* from ftape-rw.c */ -FT_KSYM(ftape_set_state) +EXPORT_SYMBOL(ftape_set_state); + /* from ftape-ctl.c */ -FT_KSYM(ftape_seek_to_bot) -FT_KSYM(ftape_seek_to_eot) -FT_KSYM(ftape_abort_operation) -FT_KSYM(ftape_get_status) -FT_KSYM(ftape_enable) -FT_KSYM(ftape_disable) -FT_KSYM(ftape_mmap) -FT_KSYM(ftape_calibrate_data_rate) +EXPORT_SYMBOL(ftape_seek_to_bot); +EXPORT_SYMBOL(ftape_seek_to_eot); +EXPORT_SYMBOL(ftape_abort_operation); +EXPORT_SYMBOL(ftape_get_status); +EXPORT_SYMBOL(ftape_enable); +EXPORT_SYMBOL(ftape_disable); +EXPORT_SYMBOL(ftape_mmap); +EXPORT_SYMBOL(ftape_calibrate_data_rate); + /* from ftape-io.c */ -FT_KSYM(ftape_reset_drive) -FT_KSYM(ftape_command) -FT_KSYM(ftape_parameter) -FT_KSYM(ftape_ready_wait) -FT_KSYM(ftape_report_operation) -FT_KSYM(ftape_report_error) +EXPORT_SYMBOL(ftape_reset_drive); +EXPORT_SYMBOL(ftape_command); +EXPORT_SYMBOL(ftape_parameter); +EXPORT_SYMBOL(ftape_ready_wait); +EXPORT_SYMBOL(ftape_report_operation); +EXPORT_SYMBOL(ftape_report_error); + /* from ftape-read.c */ -FT_KSYM(ftape_read_segment_fraction) -FT_KSYM(ftape_zap_read_buffers) -FT_KSYM(ftape_read_header_segment) -FT_KSYM(ftape_decode_header_segment) +EXPORT_SYMBOL(ftape_read_segment_fraction); +EXPORT_SYMBOL(ftape_zap_read_buffers); +EXPORT_SYMBOL(ftape_read_header_segment); +EXPORT_SYMBOL(ftape_decode_header_segment); + /* from ftape-write.c */ -FT_KSYM(ftape_write_segment) -FT_KSYM(ftape_start_writing) -FT_KSYM(ftape_loop_until_writes_done) +EXPORT_SYMBOL(ftape_write_segment); +EXPORT_SYMBOL(ftape_start_writing); +EXPORT_SYMBOL(ftape_loop_until_writes_done); + /* from ftape-buffer.h */ -FT_KSYM(ftape_set_nr_buffers) +EXPORT_SYMBOL(ftape_set_nr_buffers); + /* from ftape-format.h */ -FT_KSYM(ftape_format_track) -FT_KSYM(ftape_format_status) -FT_KSYM(ftape_verify_segment) +EXPORT_SYMBOL(ftape_format_track); +EXPORT_SYMBOL(ftape_format_status); +EXPORT_SYMBOL(ftape_verify_segment); + /* from tracing.c */ #ifndef CONFIG_FT_NO_TRACE_AT_ALL -FT_KSYM(ftape_tracing) -FT_KSYM(ftape_function_nest_level) -FT_KSYM(ftape_trace_call) -FT_KSYM(ftape_trace_exit) -FT_KSYM(ftape_trace_log) -#endif -/* end of ksym table */ -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -#include -}; +EXPORT_SYMBOL(ftape_tracing); +EXPORT_SYMBOL(ftape_function_nest_level); +EXPORT_SYMBOL(ftape_trace_call); +EXPORT_SYMBOL(ftape_trace_exit); +EXPORT_SYMBOL(ftape_trace_log); #endif diff -urN linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape_syms.h linux/drivers/char/ftape/lowlevel/ftape_syms.h --- linux-2.4.0t4/drivers/char/ftape/lowlevel/ftape_syms.h Tue Nov 25 17:45:27 1997 +++ linux/drivers/char/ftape/lowlevel/ftape_syms.h Wed Dec 31 19:00:00 1969 @@ -1,39 +0,0 @@ -#ifndef _FTAPE_SYMS_H -#define _FTAPE_SYMS_H - -/* - * Copyright (C) 1996-1997 Claus-Justus Heine - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - * - * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape_syms.h,v $ - * $Revision: 1.2 $ - * $Date: 1997/10/05 19:18:32 $ - * - * This file contains the definitions needed to export symbols - * from the QIC-40/80/3010/3020 floppy-tape driver "ftape" for - * Linux. - */ - -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -#include -/* ftape-vfs.c defined global vars. - */ - -extern struct symbol_table ftape_symbol_table; -#endif - -#endif diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape-buffers.c linux/drivers/char/ftape/zftape/zftape-buffers.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape-buffers.c Sun Nov 8 14:13:46 1998 +++ linux/drivers/char/ftape/zftape/zftape-buffers.c Thu Jul 13 21:06:22 2000 @@ -28,12 +28,8 @@ #include #include #include - #include - -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,0) #include -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h" diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape-ctl.c linux/drivers/char/ftape/zftape/zftape-ctl.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape-ctl.c Wed May 6 13:56:03 1998 +++ linux/drivers/char/ftape/zftape/zftape-ctl.c Thu Jul 13 21:06:22 2000 @@ -30,14 +30,8 @@ #define __NO_VERSION__ #include #include - #include - -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6) #include -#else -#include -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h" @@ -1008,18 +1002,11 @@ */ TRACE_EXIT 0; } -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_to_user(mtftseg->mt_data, zft_deblock_buf, mtftseg->mt_result) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_WRITE, mtftseg->mt_data, - mtftseg->mt_result),); - memcpy_tofs(mtftseg->mt_data, zft_deblock_buf, - mtftseg->mt_result); -#endif TRACE_EXIT 0; } #endif @@ -1067,19 +1054,11 @@ TRACE_EXIT -ENXIO; } if (mtftseg->mt_mode != FT_WR_DELETE) { -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_from_user(zft_deblock_buf, mtftseg->mt_data, FT_SEGMENT_SIZE) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, - mtftseg->mt_data, - FT_SEGMENT_SIZE),); - memcpy_fromfs(zft_deblock_buf, mtftseg->mt_data, - FT_SEGMENT_SIZE); -#endif } mtftseg->mt_result = ftape_write_segment(mtftseg->mt_segno, zft_deblock_buf, @@ -1426,14 +1405,9 @@ ft_t_info, "bad argument size: %d", arg_size); } if (dir & _IOC_WRITE) { -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_from_user(&krnl_arg, arg, arg_size) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, arg, arg_size),); - memcpy_fromfs(&krnl_arg, arg, arg_size); -#endif } TRACE(ft_t_flow, "called with ioctl command: 0x%08x", command); switch (command) { @@ -1486,14 +1460,9 @@ break; } if ((result >= 0) && (dir & _IOC_READ)) { -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_to_user(arg, &krnl_arg, arg_size) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_WRITE, arg, arg_size),); - memcpy_tofs(arg, &krnl_arg, arg_size); -#endif } TRACE_EXIT result; } diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape-init.c linux/drivers/char/ftape/zftape/zftape-init.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape-init.c Thu Jul 13 19:28:06 2000 +++ linux/drivers/char/ftape/zftape/zftape-init.c Thu Jul 13 21:11:09 2000 @@ -46,7 +46,6 @@ #include "../zftape/zftape-write.h" #include "../zftape/zftape-ctl.h" #include "../zftape/zftape-buffers.h" -#include "../zftape/zftape_syms.h" char zft_src[] __initdata = "$Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-init.c,v $"; char zft_rev[] __initdata = "$Revision: 1.8 $"; diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape-read.c linux/drivers/char/ftape/zftape/zftape-read.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape-read.c Thu Mar 12 13:33:21 1998 +++ linux/drivers/char/ftape/zftape/zftape-read.c Thu Jul 13 21:06:22 2000 @@ -26,14 +26,8 @@ #include #include - #include - -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6) #include -#else -#include -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h" @@ -172,15 +166,10 @@ } else { *read_cnt = to_do; } -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_to_user(dst_buf, src_buf + pos->seg_byte_pos, *read_cnt) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_WRITE, dst_buf, *read_cnt),); - memcpy_tofs(dst_buf, src_buf + pos->seg_byte_pos, *read_cnt); -#endif TRACE(ft_t_noise, "nr bytes just read: %d", *read_cnt); TRACE_EXIT *read_cnt; } diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape-write.c linux/drivers/char/ftape/zftape/zftape-write.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape-write.c Thu Mar 12 13:33:21 1998 +++ linux/drivers/char/ftape/zftape/zftape-write.c Thu Jul 13 21:06:22 2000 @@ -26,14 +26,8 @@ #include #include - #include - -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6) #include -#else -#include -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h" @@ -321,14 +315,9 @@ */ space_left = seg_sz - pos->seg_byte_pos; *cnt = req_len < space_left ? req_len : space_left; -#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3) if (copy_from_user(dst_buf + pos->seg_byte_pos, src_buf, *cnt) != 0) { TRACE_EXIT -EFAULT; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, src_buf, *cnt),); - memcpy_fromfs(dst_buf + pos->seg_byte_pos, src_buf, *cnt); -#endif TRACE_EXIT *cnt; } diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape_syms.c linux/drivers/char/ftape/zftape/zftape_syms.c --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape_syms.c Wed May 20 21:54:37 1998 +++ linux/drivers/char/ftape/zftape/zftape_syms.c Thu Jul 13 21:06:22 2000 @@ -26,7 +26,6 @@ #define __NO_VERSION__ #include - #include #include "../zftape/zftape-init.h" @@ -34,26 +33,14 @@ #include "../zftape/zftape-buffers.h" #include "../zftape/zftape-ctl.h" -#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) -# define FT_KSYM(sym) EXPORT_SYMBOL(##sym); -#else -# define FT_KSYM(sym) X(##sym), -#endif - -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -struct symbol_table zft_symbol_table = { -#include -#endif /* zftape-init.c */ -FT_KSYM(zft_cmpr_register) -FT_KSYM(zft_cmpr_unregister) +EXPORT_SYMBOL(zft_cmpr_register); +EXPORT_SYMBOL(zft_cmpr_unregister); + /* zftape-read.c */ -FT_KSYM(zft_fetch_segment_fraction) +EXPORT_SYMBOL(zft_fetch_segment_fraction); + /* zftape-buffers.c */ -FT_KSYM(zft_vmalloc_once) -FT_KSYM(zft_vmalloc_always) -FT_KSYM(zft_vfree) -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -#include -}; -#endif +EXPORT_SYMBOL(zft_vmalloc_once); +EXPORT_SYMBOL(zft_vmalloc_always); +EXPORT_SYMBOL(zft_vfree); diff -urN linux-2.4.0t4/drivers/char/ftape/zftape/zftape_syms.h linux/drivers/char/ftape/zftape/zftape_syms.h --- linux-2.4.0t4/drivers/char/ftape/zftape/zftape_syms.h Tue Nov 25 17:45:28 1997 +++ linux/drivers/char/ftape/zftape/zftape_syms.h Wed Dec 31 19:00:00 1969 @@ -1,39 +0,0 @@ -#ifndef _ZFTAPE_SYMS_H -#define _ZFTAPE_SYMS_H - -/* - * Copyright (C) 1996, 1997 Claus-Justus Heine - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - * - * $Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape_syms.h,v $ - * $Revision: 1.2 $ - * $Date: 1997/10/05 19:19:14 $ - * - * This file contains the definitions needed for the symbols - * ftape exports - * - */ - -#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) -#include -/* ftape-vfs.c defined global vars. - */ - -extern struct symbol_table zft_symbol_table; -#endif - -#endif diff -urN linux-2.4.0t4/include/linux/ftape.h linux/include/linux/ftape.h --- linux-2.4.0t4/include/linux/ftape.h Tue Apr 11 20:33:37 2000 +++ linux/include/linux/ftape.h Thu Jul 13 21:09:47 2000 @@ -30,9 +30,6 @@ #define FTAPE_VERSION "ftape v3.04d 25/11/97" -/* this makes the Kernel version numbers readable */ -#define KERNEL_VER(major,minor,sublvl) (((major)<<16)+((minor)<<8)+(sublvl)) - #ifdef __KERNEL__ #include #include