Theodore Ts'o | 3b5386d | 2000-08-14 14:25:19 +0000 | [diff] [blame] | 1 | |
| 2 | #ifndef _JFS_COMPAT_H |
| 3 | #define _JFS_COMPAT_H |
| 4 | |
| 5 | #include "e2fsck.h" |
| 6 | #include <errno.h> |
| 7 | |
| 8 | #define printk printf |
| 9 | #define KERN_ERR "" |
| 10 | #define KERN_DEBUG "" |
| 11 | |
| 12 | #define READ 0 |
| 13 | #define WRITE 1 |
| 14 | |
| 15 | typedef int tid_t; |
| 16 | typedef e2fsck_t kdev_t; |
| 17 | typedef struct journal_s journal_t; |
| 18 | |
| 19 | struct buffer_head { |
| 20 | char b_data[8192]; |
| 21 | e2fsck_t b_ctx; |
| 22 | io_channel b_io; |
| 23 | int b_size; |
| 24 | blk_t b_blocknr; |
| 25 | int b_dirty; |
| 26 | int b_uptodate; |
| 27 | int b_err; |
| 28 | }; |
| 29 | |
| 30 | struct inode { |
| 31 | e2fsck_t i_ctx; |
| 32 | ino_t i_ino; |
| 33 | struct ext2_inode i_ext2; |
| 34 | }; |
| 35 | |
| 36 | int bmap(struct inode *inode, int block); |
| 37 | struct buffer_head *getblk(e2fsck_t ctx, blk_t blocknr, int blocksize); |
| 38 | void ll_rw_block(int rw, int dummy, struct buffer_head *bh); |
| 39 | void mark_buffer_dirty(struct buffer_head *bh, int dummy); |
| 40 | void brelse(struct buffer_head *bh); |
| 41 | int buffer_uptodate(struct buffer_head *bh); |
| 42 | void wait_on_buffer(struct buffer_head *bh); |
| 43 | #define fsync_dev(dev) do {} while(0) |
| 44 | #define buffer_req(bh) 1 |
| 45 | #define do_readahead(journal, start) do {} while(0) |
| 46 | #define J_ASSERT(assert) \ |
| 47 | do { if (!(assert)) { \ |
| 48 | printf ("Assertion failure in %s() at %s line %d: " \ |
| 49 | "\"%s\"\n", \ |
| 50 | __FUNCTION__, __FILE__, __LINE__, # assert); \ |
| 51 | exit(FSCK_ERROR); \ |
| 52 | } } while (0) |
| 53 | |
| 54 | #endif /* _JFS_COMPAT_H */ |