/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_HSFS_ISOSPEC_H
#define _SYS_FS_HSFS_ISOSPEC_H
/*
* ISO 9660 filesystem specification
*/
#ifdef __cplusplus
extern "C" {
#endif
/* macros to parse binary integers */
#define MSB_INT(x) \
#define LSB_INT(x) \
#define BOTH_SHORT(x) (short)*((short *)x)
#define BOTH_INT(x) (int)*((int *)x)
/*
* SPARC machines require that integers must
* be aligned on a full word boundary. CD-ROM data aligns
* to even word boundary only. Because of this mismatch,
* we have to move integer data from CD-ROM to memory one
* byte at a time. LSB data starts first. We therefore
* use this to do byte by byte copying.
*/
#endif
/*
* The following describes actual on-disk structures.
* To achieve portability, all structures are #defines
* rather than a structure definition. Macros are provided
* to get either the data or address of individual fields.
*/
/* Overall High Sierra disk structure */
/* sectors per page */
/* Standard File Structure Volume Descriptor */
enum iso_voldesc_type {
};
/* macros to get the address of each field */
/* macros to get the values of each field (strings are returned as ptrs) */
/* Standard File Structure Volume Descriptor date fields */
((x)[1] - '0'))
(((x)[1] - '0') * 100) + \
(((x)[2] - '0') * 10) + \
((x)[3] - '0'))
/* Directory Entry (Directory Record) */
/* max size of a name */
/* macros to get the address of each field */
IDE_PAD_LEN(x)] + IDE_FDESIZE)
/* macros to get the values of each field (strings are returned as ptrs) */
(int)(IDE_NAME_LEN(x)) - (int)(IDE_PAD_LEN(x)))
/* mask bits for IDE_FLAGS */
/* Directory Record date fields */
/* tests for Interchange Levels 1 & 2 file types */
/*
* A ISO filename is: "ABCDE.EEE;1" -> <filename> '.' <ext> ';' <version #>
*
* The ISO-9660:1988 (Version 1) maximum needed string length is:
* 30 chars (filename + ext)
* + 2 chars ('.' + ';')
* + strlen("32767")
* + null byte
* ================================
* = 38 chars
*
* ISO_DIR_NAMELEN counts 30 chars + '.'
*/
/* excluding ";" and version num */
/* Path table enry */
/* fix size of path table entry */
/* macros to get the address of each field */
/* macros to get the values of each field */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_HSFS_ISOSPEC_H */