/*------------------------------------------------------------------------------------------*\ * * Copyright (C) 2004 AVM GmbH * * 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 of the License, 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; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \*------------------------------------------------------------------------------------------*/ #ifndef _tffs_local_h_ #define _tffs_local_h_ /*-----------------------------------------------------------------------------------------------*\ \*-----------------------------------------------------------------------------------------------*/ /*--- #define TFFS_DEBUG ---*/ #if defined(TFFS_DEBUG) #define DBG(a) printk a #else /*--- #if defined(TFFS_DEBUG) ---*/ #define DBG(a) #endif /*--- #else ---*/ /*--- #if defined(TFFS_DEBUG) ---*/ /*-----------------------------------------------------------------------------------------------*\ \*-----------------------------------------------------------------------------------------------*/ #define MODULE_NAME "tffs" /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ enum _tffs_thread_state { tffs_thread_state_off, tffs_thread_state_init, tffs_thread_state_idle, tffs_thread_state_process, tffs_thread_state_down }; /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ extern struct semaphore tffs_sema; extern int tffs_thread_event; extern enum _tffs_thread_state tffs_thread_state; extern unsigned int tffs_request_count; extern int tffs_mtd[2]; /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ struct _tffs_open { unsigned int init_flag; unsigned int id; unsigned char *z_Buffer; unsigned int z_length; z_stream stream; }; int tffs_ioctl(struct inode *inode, struct file *filp, unsigned int ioctl_param, unsigned long argv); ssize_t tffs_write(struct file *filp, const char *write_buffer, size_t write_length, loff_t *offp); ssize_t tffs_read(struct file *filp, char *read_buffer, size_t max_read_length, loff_t *offp); int tffs_open(struct inode *inode, struct file *filp); int tffs_release(struct inode *inode, struct file *filp); int tffs_lock(void); void tffs_unlock(void); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #ifdef CONFIG_PROC_FS int tffs_read_proc ( char *page, char **start, off_t off,int count, int *eof, void *data_unused); int tffs_write_proc(struct file *file, const char *buffer, unsigned long count, void *data); #endif /*--- #ifdef CONFIG_PROC_FS ---*/ #endif /*--- #ifndef _tffs_local_h_ ---*/