blob: 1fa49ca86d96de95a717cadc40f7bf4efe16c932 [file] [log] [blame]
Theodore Ts'o3b5386d2000-08-14 14:25:19 +00001
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
15typedef int tid_t;
16typedef e2fsck_t kdev_t;
17typedef struct journal_s journal_t;
18
19struct 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
30struct inode {
31 e2fsck_t i_ctx;
32 ino_t i_ino;
33 struct ext2_inode i_ext2;
34};
35
36int bmap(struct inode *inode, int block);
37struct buffer_head *getblk(e2fsck_t ctx, blk_t blocknr, int blocksize);
38void ll_rw_block(int rw, int dummy, struct buffer_head *bh);
39void mark_buffer_dirty(struct buffer_head *bh, int dummy);
40void brelse(struct buffer_head *bh);
41int buffer_uptodate(struct buffer_head *bh);
42void 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 */