/*static char *SCCSID = "@(#)vol.h	6.2 91/01/14";*/
/*	SCCSID = "@(#)vol.h	6.2 91/01/14"
 *
 *	IBM/Microsoft Confidential
 *
 *	Copyright (c) IBM Corporation 1987, 1989
 *	Copyright (c) Microsoft Corporation 1987, 1989
 *
 *	All Rights Reserved
 *
 */

/*
 *  VOL.H
 *
 *    DESCRIPTION
 *    
 *      Constants and structures related to volumes.
 *
 *
 *  REVISION HISTORY (in reverse chronological order)
 *  -----------------------------------------------------------------------
 *  2/22/89     Brian Andrew    Added define for error code to indicate
 *                              disk cannot be modified.
 *  11/14/89    Brian Andrew    Added escape sequence for Kanji
 *  8/4/89      Brian Andrew    Initial Blank Template
 *
 *
 *  TO DO
 *  -------------------------------------------------------------------------
 */

/*
 ***    Constants used for volumes
 *
 */

#define VOL_ID_LEN              5   /* Length of ID string in vol desc  */
#define VPSFI_ID_LEN            11  /* Length of VOL ID stored in vpfsi */

/* Volume Descriptor types */
#define VOL_BOOT_REC            0
#define VOL_PRIMARY             1
#define VOL_SECONDARY           2
#define VOL_PARTITION           3
#define VOL_TERMINATOR          255

/* Version of CD standard */
#define     VERSION_1           1

/* First Sector containing volume descriptor */
#define     VTOC_ST_SECTOR      16

/* Sector Size */

#define     SECTOR_SIZE         2048

/* Number of bits to shift to eliminate the partial sectors */
#define     SECTOR_BITS         11

#define     MAX_SECTOR          0x7FFFFFFF

/* Maximum length of a directory name */
#define     MAX_DIRID_LEN       31

/* Length of directory entry for root directory */
#define     LEN_ROOT_DE         34

/* Offset in a sector of the volume descriptor start */
#define     VOL_DESC_OFF        0


/* Constants used for volumes */
#define     ISO_FILE_ID_LEN     37
#define     HSG_FILE_ID_LEN     32
#define     VOLUME_ID_LEN       32
#define     MAX_FILE_ID_LEN     38
#define     VOL_CREATE_BYTES    16

/* Constants for vol creation array */
#define CR_YEAR_OFF             0
#define CR_YEAR_LEN             4
#define CR_MONTH_OFF            4
#define CR_MONTH_LEN            2
#define CR_DAY_OFF              6
#define CR_DAY_LEN              2
#define CR_HOUR_OFF             8
#define CR_HOUR_LEN             2
#define CR_MINUTE_OFF           10
#define CR_MINUTE_LEN           2
#define CR_SECOND_OFF           12
#define CR_SECOND_LEN           2

/*
 *  This is the error code returned by the FSD to indicate that the
 *  volume may not be modified.  Since a dedicated error code may
 *  be created in the future, this definition will simplify any update.
 */

#define CDROM_WRITE_PROTECT     ERROR_WRITE_PROTECT

/* Offset of root directory in the volume descriptor */
#define ROOT_OFFSET (3 + 38 + 38 + 38 + 38 + 4 + 6 + 4 + 16 + 16)

/*
 *  Maximum number of sectors to read at one time, (actually one less than
 *  sectors read at one time, 0 means 1 sector read)
 */

#define     MAX_DIR_SECTORS     0L

/* Escape sequences for supplemental volume descriptors */

/*
 *  The following escape sequence is used to identify a valid
 *  supplemental volume descriptor for compatibility with
 *  the MSCDEX version which supported KANJI.
 */

#define KANJI_ESC_SEQ   "$+:"
#define LEN_KANJI_SEQ   3


