#ifndef _ISO9660_H #define _ISO9660_H /* * The isofs filesystem constants/structures */ /* This part borrowed from the bsd386 isofs */ #define ISODCL(from, to) (to - from + 1) struct iso_volume_descriptor { char type[ISODCL(1,1)]; /* 711 */ char id[ISODCL(2,6)]; char version[ISODCL(7,7)]; char data[ISODCL(8,2048)]; }; #define ISO_SECTOR_BITS (11) #define ISO_SECTOR_SIZE (1< static inline int isonum_711(char *p) { unsigned char x = *(unsigned char *)p; return x; } static inline int isonum_712(char *p) { return *(char *)p; } static inline int isonum_721(char *p) { return le16_to_cpu(*(unsigned short *)p); } static inline int isonum_722(char *p) { return be16_to_cpu(*(unsigned short *)p); } static inline int isonum_723(char *p) { /* Ignore bigendian datum due to broken mastering programs */ return le16_to_cpu(*(unsigned short *)p); } static inline int isonum_731(char *p) { return le32_to_cpu(*(unsigned int *)p); } static inline int isonum_732(char *p) { return be32_to_cpu(*(unsigned int *)p); } static inline int isonum_733(char *p) { /* Ignore bigendian datum due to broken mastering programs */ return le32_to_cpu(*(unsigned int *)p); } #endif /* _ISO9660_H */