Whamcloud - gitweb
ChangeLog, jfs.h, jfs_compat.h:
[tools/e2fsprogs.git] / include / linux / jfs_compat.h
1
2 #ifndef _JFS_COMPAT_H
3 #define _JFS_COMPAT_H
4
5 #include <linux/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 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         int                     j_blocksize;
40         unsigned int            j_blk_offset;
41         unsigned int            j_maxlen;
42         struct inode *          j_inode;
43         tid_t                   j_tail_sequence;
44         tid_t                   j_transaction_sequence;
45         __u8                    j_uuid[16];
46         struct jfs_revoke_table_s *j_revoke;
47 };
48
49 #define J_ASSERT(assert)                                                \
50         do { if (!(assert)) {                                           \
51                 printf ("Assertion failure in %s() at %s line %d: "     \
52                         "\"%s\"\n",                                     \
53                         __FUNCTION__, __FILE__, __LINE__, # assert);    \
54                 fatal_error(e2fsck_global_ctx, 0);                      \
55         } } while (0)
56
57 #define is_journal_abort(x) 0
58
59 /* Need this so we can compile with configure --enable-gcc-wall */
60 #ifdef NO_INLINE_FUNCS
61 #define inline
62 #endif
63
64 #endif /* _JFS_COMPAT_H */