buf.h 755 B

12345678910111213141516171819202122
  1. #ifndef __MFS_BUF_H__
  2. #define __MFS_BUF_H__
  3. #include "clean.h"
  4. union ixfer_fsdata_u {
  5. char b__data[1]; /* ordinary user data */
  6. struct direct b__dir[1]; /* directory block */
  7. zone_t b__v2_ind[1]; /* V2 indirect block */
  8. d2_inode b__v2_ino[1]; /* V2 inode block */
  9. bitchunk_t b__bitmap[1]; /* bit map block */
  10. };
  11. /* These defs make it possible to use to bp->b_data instead of bp->b.b__data */
  12. #define b_data(b) ((union ixfer_fsdata_u *) b->data)->b__data
  13. #define b_dir(b) ((union ixfer_fsdata_u *) b->data)->b__dir
  14. #define b_v2_ind(b) ((union ixfer_fsdata_u *) b->data)->b__v2_ind
  15. #define b_v2_ino(b) ((union ixfer_fsdata_u *) b->data)->b__v2_ino
  16. #define b_bitmap(b) ((union ixfer_fsdata_u *) b->data)->b__bitmap
  17. #endif