3
0

jfs_compat.h 1.4 KB

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