iso9660.h revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
/*
* ISO 9660 filesystem backend for GRUB (GRand Unified Bootloader)
* including Rock Ridge Extensions support
*
* Copyright (C) 1998, 1999 Kousuke Takai <tak@kmc.kyoto-u.ac.jp>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* References:
* (all are written by Eric Youngdale)
*/
#ifndef _ISO9660_H_
#define _ISO9660_H_
#define ISO_SECTOR_BITS (11)
#define ISO_OTHER 0 /* other file (with Rock Ridge) */
/* POSIX file attributes for Rock Ridge extensions */
#define POSIX_S_IFMT 0xF000
#define POSIX_S_IFREG 0x8000
#define POSIX_S_IFDIR 0x4000
/* volume descriptor types */
#define ISO_VD_PRIMARY 1
#define ISO_VD_END 255
#define ISO_STANDARD_ID "CD001"
#ifndef ASM_FILE
#ifndef __sun
#ifndef __BIT_TYPES_DEFINED__
#endif
#else
#ifndef GRUB_UTIL
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
#endif /* ! GRUB_UTIL */
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
#endif /* __sun */
typedef union {
u_int8_t l,b;
} iso_8bit_t;
struct __iso_16bit {
u_int16_t l, b;
} __attribute__ ((packed));
typedef struct __iso_16bit iso_16bit_t;
struct __iso_32bit {
u_int32_t l, b;
} __attribute__ ((packed));
typedef struct __iso_32bit iso_32bit_t;
struct iso_directory_record {
} __attribute__ ((packed));
struct iso_primary_descriptor {
} __attribute__ ((packed));
struct rock_ridge {
union {
struct SP {
} sp;
struct CE {
} ce;
struct ER {
} er;
struct RR {
} rr;
struct PX {
} px;
struct PN {
} pn;
struct SL {
struct SL_component {
} link;
} sl;
struct NM {
} nm;
struct CL {
} cl;
struct PL {
} pl;
struct TF {
iso_date_t times[0];
} tf;
} u;
} __attribute__ ((packed));
typedef union RR_ptr {
struct rock_ridge *rr;
char *ptr;
int i;
} RR_ptr_t;
#endif /* !ASM_FILE */
#endif /* _ISO9660_H_ */