sysfile.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) Dataindustrier DIAB AB, Sweden, 1986
  3. */
  4. #ifndef _rhSYS_FS_DNIX_SYSFILE
  5. #define _rhSYS_FS_DNIX_SYSFILE
  6. /*
  7. * Structures used by filehandler
  8. * SCCSID(@(#) sysfile.h 5.2.2.1)
  9. */
  10. /*
  11. * Structure of the system-file
  12. *
  13. * This is a read-only structure for some vital volume parameters
  14. * All numerical values are 32-bit stored MSByte ... LSByte.
  15. * Last byte is an overall checksum computed as
  16. * the sum of all bytes modulo 256 and negated(so it will sum to 0).
  17. *
  18. * Soft checksum stuff:
  19. * If the "s_ckflg" flag is set, then soft checksum is enabled on this
  20. * volume. This checksum is computed by XOR'ing each data block
  21. * (s_bksiz bytes each) into a n-byte integer. The value of n is given by
  22. * the value of "s_chkflg". n is preferrably four (4) on a 32-bit CPU.
  23. * The checksum's are stored at s_vlsiz and beyond, one n-byte value
  24. * for each logical block. There is a utility program to turn this
  25. * feature on or off.
  26. */
  27. struct sysfile {
  28. char s_fhnd[16]; /* Filehandler spec */
  29. daddr_t s_bmadr; /* Bitmap pointer */
  30. daddr_t s_inadr; /* Inode list pointer */
  31. daddr_t s_rtadr; /* Root file pointer */
  32. daddr_t s_swadr; /* Swap area */
  33. daddr_t s_vlsiz; /* Volume size */
  34. daddr_t s_bmsiz; /* Bitmap size */
  35. daddr_t s_swsiz; /* Swap area size */
  36. daddr_t s_bksiz; /* Block size */
  37. daddr_t s_disiz; /* Size of a directory entry */
  38. daddr_t s_insiz; /* Default size of inode list */
  39. time_t s_time; /* Time initiated */
  40. char s_fname[8]; /* Filsys name */
  41. char s_fpack[8]; /* Filsys pack name */
  42. daddr_t s_[44]; /* Reserved */
  43. char s_c[2]; /* Reserved */
  44. char s_ckflg; /* Checksum on this volume */
  45. char s_chksum; /* Check sum of all bytes */
  46. };
  47. #define filsys sysfile /* To make diab and ATT compatible */
  48. #endif /* _rhSYS_FS_DNIX_SYSFILE */