Home | History | Annotate | Download | only in ext2fs
      1 
      2 #ifndef _JFS_COMPAT_H
      3 #define _JFS_COMPAT_H
      4 
      5 #include "kernel-list.h"
      6 #include <errno.h>
      7 #ifdef HAVE_NETINET_IN_H
      8 #include <netinet/in.h>
      9 #endif
     10 
     11 #define printk printf
     12 #define KERN_ERR ""
     13 #define KERN_DEBUG ""
     14 
     15 #define READ 0
     16 #define WRITE 1
     17 
     18 #define cpu_to_be32(n) htonl(n)
     19 #define be32_to_cpu(n) ntohl(n)
     20 
     21 typedef unsigned int tid_t;
     22 typedef struct journal_s journal_t;
     23 
     24 struct buffer_head;
     25 struct inode;
     26 
     27 struct journal_s
     28 {
     29 	unsigned long		j_flags;
     30 	int			j_errno;
     31 	struct buffer_head *	j_sb_buffer;
     32 	struct journal_superblock_s *j_superblock;
     33 	int			j_format_version;
     34 	unsigned long		j_head;
     35 	unsigned long		j_tail;
     36 	unsigned long		j_free;
     37 	unsigned long		j_first, j_last;
     38 	kdev_t			j_dev;
     39 	kdev_t			j_fs_dev;
     40 	int			j_blocksize;
     41 	unsigned int		j_blk_offset;
     42 	unsigned int		j_maxlen;
     43 	struct inode *		j_inode;
     44 	tid_t			j_tail_sequence;
     45 	tid_t			j_transaction_sequence;
     46 	__u8			j_uuid[16];
     47 	struct jbd_revoke_table_s *j_revoke;
     48 };
     49 
     50 #define J_ASSERT(assert)						\
     51 	do { if (!(assert)) {						\
     52 		printf ("Assertion failure in %s() at %s line %d: "	\
     53 			"\"%s\"\n",					\
     54 			__FUNCTION__, __FILE__, __LINE__, # assert);	\
     55 		fatal_error(e2fsck_global_ctx, 0);			\
     56 	} } while (0)
     57 
     58 #define is_journal_abort(x) 0
     59 
     60 #define BUFFER_TRACE(bh, info)	do {} while (0)
     61 
     62 /* Need this so we can compile with configure --enable-gcc-wall */
     63 #ifdef NO_INLINE_FUNCS
     64 #define inline
     65 #endif
     66 
     67 #endif /* _JFS_COMPAT_H */
     68