efs_vh.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * efs_vh.h
  3. *
  4. * Copyright (c) 1999 Al Smith
  5. *
  6. * Portions derived from IRIX header files (c) 1985 MIPS Computer Systems, Inc.
  7. */
  8. #ifndef __EFS_VH_H__
  9. #define __EFS_VH_H__
  10. #define VHMAGIC 0xbe5a941 /* volume header magic number */
  11. #define NPARTAB 16 /* 16 unix partitions */
  12. #define NVDIR 15 /* max of 15 directory entries */
  13. #define BFNAMESIZE 16 /* max 16 chars in boot file name */
  14. #define VDNAMESIZE 8
  15. struct volume_directory {
  16. char vd_name[VDNAMESIZE]; /* name */
  17. __be32 vd_lbn; /* logical block number */
  18. __be32 vd_nbytes; /* file length in bytes */
  19. };
  20. struct partition_table { /* one per logical partition */
  21. __be32 pt_nblks; /* # of logical blks in partition */
  22. __be32 pt_firstlbn; /* first lbn of partition */
  23. __be32 pt_type; /* use of partition */
  24. };
  25. struct volume_header {
  26. __be32 vh_magic; /* identifies volume header */
  27. __be16 vh_rootpt; /* root partition number */
  28. __be16 vh_swappt; /* swap partition number */
  29. char vh_bootfile[BFNAMESIZE]; /* name of file to boot */
  30. char pad[48]; /* device param space */
  31. struct volume_directory vh_vd[NVDIR]; /* other vol hdr contents */
  32. struct partition_table vh_pt[NPARTAB]; /* device partition layout */
  33. __be32 vh_csum; /* volume header checksum */
  34. __be32 vh_fill; /* fill out to 512 bytes */
  35. };
  36. /* partition type sysv is used for EFS format CD-ROM partitions */
  37. #define SGI_SYSV 0x05
  38. #define SGI_EFS 0x07
  39. #define IS_EFS(x) (((x) == SGI_EFS) || ((x) == SGI_SYSV))
  40. struct pt_types {
  41. int pt_type;
  42. char *pt_name;
  43. };
  44. #endif /* __EFS_VH_H__ */