#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 07/12/1993 23:44 UTC by dragon@tao
# Source directory /home/tao/dragon/rockridge/rrip
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    981 -rw-r--r-- Makefile
#   1529 -rw-r--r-- format
#   1473 -rw-r--r-- title.nr
#   1232 -rw-r--r-- preface.nr
#    722 -rw-r--r-- overview.nr
#   3714 -rw-r--r-- desc.nr
#  37392 -rw-r--r-- rrip.nr
#    348 -rw-r--r-- bib.nr
#     10 -rw-r--r-- TOC
#
# ============= Makefile ==============
if test -f 'Makefile' -a X"$1" != X"-c"; then
	echo 'x - skipping Makefile (File already exists)'
else
echo 'x - extracting Makefile (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
# Makefile for CDROM
# Written by Scott Norton
# 
SHELL=/bin/sh
# Delete all the built-in rules
#.SUFFIXES :
X
SOURCE = format title.nr preface.nr overview.nr desc.nr rrip.nr bib.nr TOC
X
#SOURCE = format rrip.nr 
X
TROFF = troff 
X
irs:
X	cat $(SOURCE) | pic | tbl | $(TROFF) -mm
print:
X	dwb2 -mm $(SOURCE)
troff:
X	cat $(SOURCE) | pic | tbl | $(TROFF) -o17-20 -mm -rT1 > troff.out
ci:
X	ci -l $(SOURCE)
X
shar:
X	shar Makefile $(SOURCE) > rrip.shar
X
revision:
X	@echo "The current revision number is:"
X	@fgrep Revision title.nr
X
wc:
X	@echo "\tThe number of lines of source are:\c"
X	@cat $(SOURCE)  | wc -l
order:
X	@echo "The order of the files is ---"
X	@echo $(SOURCE) | tr " " "\012"
X
title:
X	cat format title.nr | tbl | $(TROFF) -mm
preface:
X	cat format preface.nr | tbl | $(TROFF) -mm
overview:
X	cat format overview.nr | tbl | $(TROFF) -mm
desc:
X	cat format desc.nr | tbl | $(TROFF) -mm
rrip:
X	cat format rrip.nr | pic | tbl | $(TROFF) -mm
bib:
X	cat format bib.nr | tbl | $(TROFF) -mm
X
SHAR_EOF
chmod 0644 Makefile ||
echo 'restore of Makefile failed'
Wc_c="`wc -c < 'Makefile'`"
test 981 -eq "$Wc_c" ||
	echo 'Makefile: original size 981, current size' "$Wc_c"
fi
# ============= format ==============
if test -f 'format' -a X"$1" != X"-c"; then
	echo 'x - skipping format (File already exists)'
else
echo 'x - extracting format (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'format' &&
.nr O 1.2i
.nr W 6i
.PH ""		\" Supress the -1- page header on the first page
.\" The entire document uses fonts designated as numbers so the following
.\" three lines may be changed to change the "look" of the document.
.fp 1 R		\" This is the standard (i.e. non-Bold/Italic) font position
.fp 2 I		\" This is the Italic font position
.fp 3 B		\" This is the Bold font position
.fp 4 S		\" This is the HP logo
.nr P 0		\" Set first page to be page 1
.\" HF sets type for .H headings 3==bold, 2==italics for levels 1-7
.ds HF 3 3 3 3 3 3 3
.\" HF sets size for .H headings, for level 1-7
.ds HP 14 12 11 11 11 11 11
.nr Ej 1	\" Start level 1 headings on new page.
.nr Hb 6	\" Headings 7 & up are part of the following paragraph
.nr Hs 6	\" Headings 1-6 are automatically followed by blank line
.nr Hi 1	\" Indent text following heading like paragraph (default)
.nr Hc 0	\" No headings are centered (default)
.nr Hu 1	\" Unnumbered headings level 1 
.tr ~ 		\" Use ~ for unpaddable space character
.ad b		\" Right-justify on
.nr Hy 0	\" No hyphenation
.nr Pi 5	\" Indent paragraphs 5 spaces
.nr Pt 1	\" Indent paragraphs Pi spaces
.nr Cl 6	\" Save first 6 heading levels for table of contents
.\" Set up global formatting stuff
.in 0i
.ll 6i
.vs 12p
.pl 10.5i
.ps 10
.\" Set up the page count as if no coversheet will be added.  If there is
.\" one added, it will override .nr PC to be one more than the amount below.
.nr PC 41
.\" Set this flag to be 0 (no coversheet), if a coversheet is there, it
.\" will override it.
.nr CS 0
SHAR_EOF
chmod 0644 format ||
echo 'restore of format failed'
Wc_c="`wc -c < 'format'`"
test 1529 -eq "$Wc_c" ||
	echo 'format: original size 1529, current size' "$Wc_c"
fi
# ============= title.nr ==============
if test -f 'title.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping title.nr (File already exists)'
else
echo 'x - extracting title.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'title.nr' &&
~
.sp |2.5i
.ce 17
.ps 25
.ft 3
ROCK RIDGE INTERCHANGE 
X
X
PROTOCOL
.ps 20
.ft 3
X
X
VERSION 1
.sp 80p
.ps 20
.ft 3
AN IS0 9660:1988 COMPLIANT APPROACH
X
TO PROVIDING ADEQUATE CD-ROM SUPPORT
X
FOR POSIX FILE SYSTEM SEMANTICS
.sp 80p
.ps 16
.ft 3
IEEE CDROM FILE SYSTEMS FORMAT 
X
WORKING GROUP
.ps 12
.ft 1
.sp 3v
Revision 1.10
.sp 3v
.\" Put names of authors here, if any
cdfsf@ymi.COM
.ps 14
.sp 3v
DRAFT STANDARD
.bp
.\"
.\" If no coversheet, set up odd/even different headers & footers
.\" else set up the same headers & footers
.ie \n(CS \{\
.   OH "'IEEE CDFSF Working Group''Rock Ridge Interchange Protocol'" 
.   EH "'IEEE CDFSF Working Group''Rock Ridge Interchange Protocol'" 
.   bp
.   OF "'\\*(DT'                     'Page \\\\nP of \\\\n(PC'"
.   EF "'\\*(DT'                     'Page \\\\nP of \\\\n(PC'" \}
.el \{\
.   OH "'IEEE CDFSF Working Group''Rock Ridge Interchange Protocol'" 
.   EH "'Rock Ridge Interchange Protocol''IEEE CDFSF Working Group'"
.   bp
.   OF "'\\*(DT'                     'Page \\\\nP of \\\\n(PC'"
.   EF "'Page \\\\nP of \\\\n(PC'                     '\\*(DT'" \}
.rs
X
.ce
( This page should be replaced with a blank page for back of title )
.bp
X
.ce
( This page should be replaced with the Table of Contents )
.bp
X
.ce
( This page should be replaced with a blank page for back of TOC )
.bp
X
.ce
( This page should be replaced with the List of Tables  )
.bp
X
.ce
( This page should be replaced with a blank page for back of Tables )
SHAR_EOF
chmod 0644 title.nr ||
echo 'restore of title.nr failed'
Wc_c="`wc -c < 'title.nr'`"
test 1473 -eq "$Wc_c" ||
	echo 'title.nr: original size 1473, current size' "$Wc_c"
fi
# ============= preface.nr ==============
if test -f 'preface.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping preface.nr (File already exists)'
else
echo 'x - extracting preface.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'preface.nr' &&
.pn 1
.sp
.H 1 "PREFACE"
.sp
.H 2 "Purpose and Scope"
.sp
Producers and users of POSIX compliant systems and software have faced a
significant, yet artificial, barrier to their effectively using CD-ROM
technology for software distribution and information publishing --
ISO 9660:1988 alone provides inadequate support for delivery of POSIX 
file system information. 
The Rock Ridge Group was formed to generate a 
proposed standard for utilizing the System Use Areas provided by the 
ISO 9660 standard to record complete POSIX file system semantics.
This proposal utilizes the System Use Sharing Protocol for recording this 
information. The IEEE CDROM File Systems Format group is formalizing the 
Rock Ridge standard for ISO adoption, incorporating changes to support 
sparse files and coexistance with other CDROM formats.
.sp
.H 2 "Summary of Sections"
.sp
.TS
center;
l l.
Section 1	Contains this preface.
Section 2	Contains an overview of the Rock Ridge Interchange Protocol.
Section 3	Contains an overview of the notation used in this document.
Section 4	Contains the Rock Ridge Interchange Protocol.
Section 5	Contains the bibliography.
.TE
.bp
.\" Blank page for back of this chapter
.ce 
X       
X        
X       
X         
SHAR_EOF
chmod 0644 preface.nr ||
echo 'restore of preface.nr failed'
Wc_c="`wc -c < 'preface.nr'`"
test 1232 -eq "$Wc_c" ||
	echo 'preface.nr: original size 1232, current size' "$Wc_c"
fi
# ============= overview.nr ==============
if test -f 'overview.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping overview.nr (File already exists)'
else
echo 'x - extracting overview.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'overview.nr' &&
.sp
.H 1 "OVERVIEW"
.sp
The Rock Ridge Interchange Protocol (RRIP) specifies an extension to the
ISO 9660 format for CD-ROM which enables the recording of POSIX File
System semantics.
The RRIP utilizes the System Use Sharing Protocol (SUSP) to specify
the definition of a set of System Use Fields for this purpose.
.sp
The RRIP specifies the definition of a set of System Use Fields for 
recording:
.sp
.VL 15
.BL
.LI
uid, gid, and permissions
.LI
file mode bits, file types, setuid, setgid, and sticky bit
.LI
file links
.LI
device nodes
.LI
symbolic links
.LI
POSIX file names
.LI
reconstruction of deep directories
.LI
time stamps
.LE
.bp
.\" Blank page for back of this chapter
.ce 
X       
X        
X       
X         
SHAR_EOF
chmod 0644 overview.nr ||
echo 'restore of overview.nr failed'
Wc_c="`wc -c < 'overview.nr'`"
test 722 -eq "$Wc_c" ||
	echo 'overview.nr: original size 722, current size' "$Wc_c"
fi
# ============= desc.nr ==============
if test -f 'desc.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping desc.nr (File already exists)'
else
echo 'x - extracting desc.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'desc.nr' &&
.sp
.H 1 "TERMINOLOGY AND NOTATION"
.sp
It is assumed that the RRIP is being recorded within an ISO 9660:1988
compliant volume using the System Use Sharing Protocol (SUSP:1991A).
Unless defined herein, or otherwise specified, terms shall be as defined
in ISO 9660:1988 or SUSP:1991A.
.sp
The following notation is used in this document.
.sp
.H 2 "Decimal and Hexadecimal Notation"
.sp
Numbers in decimal notation are represented by decimal digits, namely
0 to 9.
.sp
Numbers in hexadecimal notation are represented by hexadecimal digits,
namely 0 to 9 and A to F, shown in parentheses. 
E.g. the hexadecimal number 7F will be written as (7F).
.sp
.H 2 "Binary powers of 2"
.sp
Powers of two may be represented by abbreviation.  The abbreviation K 
represents the value 1024. E.g. the decimal number 4096 may be written as
4K.  Likewise, the abbreviation M represents 1048576.
.sp
.H 2 "File Naming Conventions"
.sp
In all fields defined in ISO 9660:1988, the character set to be used
shall be as specified in ISO 9660.
The character set to be used in the System Use Fields defined herein
shall depend upon whether the fields are recorded in a directory tree
associated with a Primary Volume Descriptor or a Supplementary Volume
Descriptor.
.sp
.H 3 "Primary Volume Descriptor File Naming Convention"
.sp
Within a directory tree identified by a Primary Volume Descriptor of
an ISO 9660 volume, the character set used in the System Use Fields
defined for the RRIP shall be the ISO Standard 8859-1:1987, as
specified in the X/Open Portability Guide Issue 3, XSI Supplementary
Definitions.
For general portability across most POSIX compatible systems, the 
7-bit U.S. ASCII character set should be used.
.sp
The POSIX File Naming Convention states that the filename may be
composed of any character except slash (2F) and the null byte (00).
The special filename, dot (2E), refers to the directory specified
by its predecessor.
The special filename dot-dot (2E)(2E), refers to the parent directory 
of its predecessor directory.
.sp
For maximum portability across implementations conforming to the
POSIX Standard, filenames should only contain the following characters:
.sp
.TS
center;
l l.
(41) thru (5A)	\'A\' thru \'Z\'
(61) thru (7A)	\'a\' thru \'z\'
(30) thru (39)	\'0\' thru \'9\'
(2E)	period
(5F)	underscore
(2D)	hyphen
.TE
.sp
Upper and lower case letters shall retain their unique identities
between conforming implementations.
.sp
.H 3 "Supplementory Volume Descriptor File Naming Convention"
.sp
Within a directory tree identified by a Supplementary Volume Descriptor
of an ISO 9660 volume, the character set used in the System Use Fields
defined for the RRIP shall be the coded graphic character set(s) identified by
the escape sequence(s) in the Supplementary Volume Descriptor
(c-characters, section 7.4.2, ISO 9660:1988).
.sp
.H 2 "Reader Makes Right"
.sp
Receiving systems which are capable of interpreting the System Use Fields
defined herein, but which cannot handle the full extent of the file naming
convention utilized by this specification may have to restrict themselves
to the use of the ISO 9660 compliant file names stored in the File Identifier
field of the ISO 9660 directory structure.
.sp
Alternatively, the developer of the receiving system may choose to provide
file name conversion capability.
Any such system must provide unique names for all unique files on the disc.
.sp
In general, whenever there is recorded a (potentially) system-specific
identifier or numerical value, accomplishing any necessary modifications
or mapping of these are the responsibility of the receiving system.
This document provides for an Application Programming Interface (API)
to support this function.
.sp
SHAR_EOF
chmod 0644 desc.nr ||
echo 'restore of desc.nr failed'
Wc_c="`wc -c < 'desc.nr'`"
test 3714 -eq "$Wc_c" ||
	echo 'desc.nr: original size 3714, current size' "$Wc_c"
fi
# ============= rrip.nr ==============
if test -f 'rrip.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping rrip.nr (File already exists)'
else
echo 'x - extracting rrip.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'rrip.nr' &&
.sp
.H 1 "ROCK RIDGE INTERCHANGE PROTOCOL"
.sp
The Rock Ridge Interchange Protocol (RRIP) utilizes System Use Areas
provided by ISO 9660:1988.
The System Use Area of the Directory Record is used to record the POSIX
file system information.
The System Use Sharing Protocol is used for recording information in
each of these areas.
.sp
.H 2 "System Use Fields Provided by this Specification"
.sp
The Rock Ridge Interchange Protocol defines the following fundamental 
System Use Fields:
.sp
.TS
center;
l l.
"PX"	POSIX file attributes
"PN"	POSIX device modes
"SL"	Symbolic link
"NM"	Alternate name
"CL"	Child link
"PL"	Parent link
"RE"	Relocated directory
"TF"	Time stamp(s) for a file
"SF"	File data is in sparse file format 
.TE
.sp
Additionally, this specification provides required identification information
to be recorded in an "ER" (Extensions Reference) System Use Field for the
purpose of identifying discs on which the Rock Ridge Interchange Protocol
is implemented.
.sp
.H 3 "Description of the PX System Use Field"
.sp
Recording of the "PX" System Use Field in the System Use Area of
each ISO 9660 directory record shall be mandatory.
No more than one
"PX" System Use Field shall appear in (all) the System Use Area(s) for
a single directory record.
.sp
If the file type in a directory record is of type directory, then
the POSIX File Mode Field ([BP 4] in this section) and File Flags (ISO
9660 Format section 9.1.6) should both indicate such, with the
exception of relocated directories, indicated by a "CL" field (section
3.1.5.1), for which the ISO file flags shall indicate a normal file,
but the POSIX File Mode Field shall indicate a directory.
.sp
The format of the "PX" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "PX" type System Use Field.
The bytes in this field shall be (50)(58) ("PX").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "PX" System Use Field.
The number in this field shall be 36 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.bp
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "PX" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 to BP 12 - POSIX File Mode" has the same meaning as the st_mode
defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.3.3.
The valid mask values for this field are combinations of the following:
.sp
.TS
center;
l l l.
Octal Value   	Mnemonic 	Meaning
\_	\_	\_
0000400	S_IRUSR	read permission (owner)
0000200	S_IWUSR	write permission (owner)
0000100	S_IXUSR	execute permission (owner)
0000040	S_IRGRP	read permission (group)
0000020	S_IWGRP	write permission (group)
0000010	S_IXGRP	execute permission (group)
0000004	S_IROTH	read permission (other)
0000002	S_IWOTH	write permission (other)
0000001	S_IXOTH	execute permission (other)
X 	 
0004000	S_ISUID	set user ID on execution
0002000	S_ISGID	set group ID on execution
0002000	S_ENFMT	enforced file locking (shared w/ set group ID)
0001000	S_ISVTX	save swapped text even after use
X 	 
0170000	S_IFMT	type of file
0140000	S_IFSOCK	socket
0120000	S_IFLNK	symbolic link
0100000	S_IFREG	regular
0060000	S_IFBLK	block special
0020000	S_IFCHR	character special
0040000	S_IFDIR	directory
0010000	S_IFIFO	pipe or FIFO
.TE
.sp
.LI "[5]"
"BP 13 to BP 20 - POSIX File Links" has the same meaning as the
st_nlink defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
If the file type described by the directory record is a
directory, the value in this field shall equal the number of
directories in the directory described by this directory record
(i.e. any directory record which has the "directory" bit set,
including the "." and ".." records).
Otherwise, it shall be 1.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.LI "[6]"
"BP 21 to BP 28 - POSIX File User ID" has the same meaning as the
st_uid defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.bp
.LI "[7]"
"BP 29 to BP 36 - POSIX File Group ID" has the same meaning as the
st_gid defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.sp
.sp
.TB "PX System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c | c.
X 	 	 	 	 
'P'	'X'	LENGTH	1	FILE MODE	LINKS
(BP1)	(BP2)	(BP3)	(BP4)	(BP5 to BP12)	(BP13 to BP20)
X 	 	 	 	 
.TE
.sp
.TS
center,box;
c | c.
X 	 
USER ID	GROUP ID
(BP21 to BP28)	(BP29 to BP36)
X 	 
.TE
.sp
.sp
.sp
.H 3 "Description of the PN System Use Field
.sp
This field is mandatory if the file type recorded in the "PX"
File Mode field for the given directory record indicates a character or block
device.
This field, if present, should be ignored for all other file types.
No more than one "PN" System Use Field shall appear in (all)
the System Use Area(s) for a single directory record.
.sp
If the receiving system records device numbers as 32-bit numbers,
only the "Dev_t Low" field shall be used. 
If the receiving system records device numbers as 64-bit numbers,
the "Dev_t High" and "Dev_t Low" fields shall be concatenated to make
one 64-bit number. 
.sp
The format of the "PN" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "PN" type System Use Field.
The bytes in this field shall be (50)(4E) ("PN").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "PN" System Use Field.
The number in this field shall be 20 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "PN" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.bp
.LI "[4]"
"BP 5 to BP 12 - Dev_t High" shall contain as a 32-bit number
the high order 32 bits of the device number.
If the receiving system records device numbers as 32-bit numbers this field
shall be zero and ignored.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.LI "[5]"
"BP 13 to BP 20 - Dev_t Low" shall contain as a 32-bit number
the low order 32-bits of the device number.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.LE
.sp
.sp
.TB "PN System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c | c.
X 	 	 	 	 
'P'	'N'	20	1	DEV_T HIGH	DEV_T LOW
(BP1)	(BP2)	(BP3)	(BP4)	(BP5 to BP12)	(BP13 to BP20)
X 	 	 	 	 
.TE
.sp
.sp
.sp
.H 3 "Description of the SL System Use Field"
.sp
The purpose of the "SL" System Use Field is to store the content
of a symbolic link.
This System Use Field is mandatory if the file
type recorded in the "PX" File Mode field for the given directory record
indicates a symbolic link.
For other file types, this System Use Field should be ignored.
If the receiving system does not support symbolic links the system should
invoke "Reader-Makes-Right".
.sp
If the file type recorded in the "PX" File Mode field for the given directory 
record indicates a symbolic link, the directory record shall point to a file,
the contents of which are not specified by this document.
.sp
If more than one "SL" System Use Field is recorded in the System
Use Area(s) for a single directory record, the Component Area (see 
section 4.1.3.1
below) of each should be concatenated together, in the order in which
they were recorded, until a CONTINUE flag with value zero is
encountered (see [4] below), to obtain the entire set of Component
Records for the symbolic link.
.sp
The method of recording is system independent.
Under reader makes right, the receiving system is responsible for supplying
appropriate values and/or notations for the component delimiter and
special cases provided for below.
.sp
.bp
The format of the "SL" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "SL" type System Use Field.
The bytes in this field shall be (53)(4C) ("SL").
.LI "[2]"
"BP 3 - Length (LEN_SL)" shall specify as an 8-bit number the length in
bytes of the "SL" System Use Field.
The number in this field shall be 5 plus the length of the Component
Area recorded in this "SL" field.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "SL" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 - Flags" shall contain bit field flags numbered 0
to 7 starting with the least significant bit as follows:
.sp
.TS
center;
c c l.
Position	Name	Interpretation if set to 1
\_	\_	\_
0	CONTINUE	This Symbolic Link continues in next "SL"
all others	RESERVED	value must be 0
.TE
.sp
.LI "[5]"
"BP 6 to LEN_SL - Component Records" shall contain Component Records
(described below).
.LE
.sp
.sp
.TB "SL System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c | c.
X 	 	 	 	 	 
'S'	'L'	LENGTH	1	FLAGS	COMPONENT RECORDS
(BP1)	(BP2)	(BP3)	(BP4)	(BP5)	(BP6 to LEN_SL)
X 	 	 	 	 	 
.TE
.sp
.sp
.sp
.H 4 "Description of the SL System Use Field Component Record"
.sp
Within a "SL" System Use Field, each component of the pathname shall
be recorded as one or more component records.
A component does not contain the component separator (/ in POSIX).
Recording a single component of a symbolic
link may require multiple Component Records.
If the component is greater than 255 bytes or will not fit into the current
System Use Area or Continuation Area more than one Component Record will be
recorded for the component.
Multiple Component Records, specifying one or more separate components 
of the symbolic link may be recorded in the Component Area of a 
single "SL" field.
.sp
If a single Component Record is used to record a single component of a
symbolic link, the CONTINUE flag must be set to zero.
If multiple Component Records are used to record a single
component of a symbolic link, the CONTINUE flag must be set to one in
each Component Record except the last and zero in the last Component
Record recording the given component.
.sp
Component Records shall be recorded contiguously within each
Component Area, starting in the first byte of each Component Area.
The last Component Record in the Component Area of an "SL" field may
be continued in the Component Area of the next recorded "SL" field.
.sp
Each Component Record shall have the following format:
.sp
.VL 10 5
.LI "[A]"
"BP 1 - Component Flags" shall contain bit field flags numbered 0
to 7 starting with the least significant bit as follows:
.sp
.TS
center;
c c l.
Position	Name	Interpretation if set to 1
\_	\_	\_
0	CONTINUE	Component recorded in this "SL" continues
X 	 	in next "SL" Component Record
1	CURRENT	Component refers to the current directory 
X 	 	(. in POSIX)
2	PARENT	Component refers to the parent of the 
X 	 	current directory (.. in POSIX)
3	ROOT	Component refers to the root of the current 
X 	 	directory tree for this process (/ in POSIX)
4	VOLROOT	Component refers to the directory the
X 	 	current CD-ROM volume is mounted on
5	HOST	The local host name should be inserted as 
X 	 	the value of the current component
all others	RESERVED	value must be 0
.TE
.sp
Bits 1 - 7 are mutually exclusive.
.sp
.LI "[B]"
"BP 2 - Component Length (LEN_CP)" shall specify as an 8-bit number the
length in bytes of the (portion of) the component recorded in the
current Component Record.
This length shall not include the Component Record Flags byte or Length byte.
If any of the 
2\s-1\u1\d\s0 thru 2\s-1\u5\d\s0
bits are set, the value of this field shall be zero.
This field shall be recorded according to ISO 9660:1988 Format section 7.1.1.
.sp
.LI "[C]"
"BP 3 to 2 + LEN_CP - Component" shall contain (the portion of) the component
recorded in the current Component Record.
The content of this field shall be recorded according to section 3.2 above.
.LE
.sp
.sp
.TB "SL System Use Field - Component Record"
.TS
center,box;
c | c | c.
X 	 	 
COMP_FLAGS	COMP_LEN	COMPONENT
(BP1)	(BP2)	(BP3 to 2+LEN_CP)
X 	 	 
.TE
.sp
.sp
.bp
.sp
.H 3 "Description of the NM System Use Field"
.sp
The purpose of the "NM" System Use Field is to store the content
of an Alternate Name to support POSIX-style or other names.
This System Use Field is optional.
If no "NM" field(s) are recorded for a
specific directory record, the ISO 9660 file identifier shall be used.
.sp
If more than one "NM" System Use Field appears in (all) the
System Use Area(s) for a single directory record, the contents ([5]
below) of each should be concatenated together, in the order in which
they were recorded, until a CONTINUE flag with value zero is
encountered (see [4] below), to obtain the entire Alternate Name.
.sp
"NM" System Use Fields recorded for the ISO 9660 directory
records with names (00) and (01), used to designate the current and
parent directories, respectively, should be ignored.
Instead, the receiving system should convert these names to the appropriate
receiving system-dependent designations for the current and parent
directories.
.sp
No sorting of the directory records by Alternate Names is
specified by the RRIP, nor can one necessarily be imposed by
originating systems or assumed by receiving systems.
The ISO 9660 specifies a sorting order based upon the ISO 9660 file 
identifier (see ISO 9660:1988, section 9.3).
.sp
The format of the "NM" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "NM" type System Use Field.
The bytes in this field shall be (4E)(4D) ("NM").
.LI "[2]"
"BP 3 - Length (LEN_NAM)" shall specify as an 8-bit number the length in
bytes of the "NM" System Use Field.
The number in this field shall be 5 plus the length (of the portion)
of the Alternate Name recorded in this "NM" field.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "NM" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.bp
.LI "[4]"
"BP 5 - Flags" shall contain bit field flags numbered 0
to 7 starting with the least significant bit as follows:
.sp
.TS
center;
c c l.
Position	Name	Interpretation if set to 1
\_	\_	\_
0	CONTINUE	Alternate Name continues in next "NM"
X 	 	field
1	CURRENT	Alternate Name refers to the current
X 	 	directory (. in POSIX)
2	PARENT	Alternate Name refers to the parent of
X 	 	the current directory (.. in POSIX)
3	RESERVED	value must be 0
4	RESERVED	value must be 0
X 	 	of the current CD-ROM volume
5	HOST	The local host name should be inserted as 
X 	 	the value of the Alternate Name
all others	RESERVED	value must be 0
.TE
.sp
Bits 1 - 7 are mutually exclusive.
.sp
.LI "[5]"
"BP 6 to LEN_NAM - Alternate Name" shall contain (a portion of) the 
content of the Alternate Name.
The content of this field shall be recorded according to section 3.2 above.
.LE
.sp
.sp
.TB "NM System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c | c.
X 	 	 	 	 	 
'N'	'M'	LENGTH	1	FLAGS	ALTERNATE NAME
(BP1)	(BP2)	(BP3)	(BP4)	(BP5)	(BP6 to LEN_NAM)
X 	 	 	 	 	 
.TE
.sp
.sp
.sp
.H 3 "System Use Fields for Handling Deep Directory Trees"
.sp
The ISO 9660:1988 mandates directory depths of no more than eight levels.
Deeper directories must be reorganized to be recorded under the ISO 9660.
The RRIP includes definitions of three System Use
Fields to support logical reconstruction of deep directory trees while
retaining complete ISO 9660 compliance.
.sp
For each specific directory, either all three of the following
fields must be appropriately recorded, or none shall be recorded.
.sp
Table 9 and Table 10 at the end of this section have graphical examples
of Deep Directory Trees.
.bp
.H 4 "Description of the CL System Use Field"
.sp
The purpose of the "CL" System Use Field is to record the new
location of a directory which has been relocated.
The field contains the Logical Block number of the Logical Sector in which 
the first directory record of the moved Directory is stored.
.sp
The "CL" System Use Field is optional.
If recorded, a "CL" System Use Field shall be recorded in the System Use 
Area of a ISO 9660 directory record which describes a file which has the 
same name as, and occupies the original position in the ISO 9660 directory tree
of, the moved Directory.
No more than one "CL" System Use Field shall appear in (all) the System Use 
Area(s) for a single directory record.
.sp
Except for the ISO 9660 name, the Alternate Name (recorded in an
"NM" System Use Field), and the new location of the Directory, all
other information stored in the directory for this file should
be ignored.
The contents of this file are not specified by this document.
All attributes of the moved Directory shall be recorded in the first directory 
record ("dot" entry) of the moved Directory in its new location.
.sp
The format of the "CL" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "CL" type System Use Field.
The bytes in this field shall be (43)(4C) ("CL").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "CL" System Use Field.
The number in this field shall be 12 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "CL" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 to BP 12 - Location of Child Directory" shall specify as a
32-bit number the Logical Block Number of the first Logical Block
allocated to the moved directory.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.LE
.sp
.sp
.TB "CL System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c.
X 	 	 	 	 
'C'	'L'	12	1	LOC of CHILD DIRECTORY
(BP1)	(BP2)	(BP3)	(BP4)	(BP5 to BP12)
X 	 	 	 	 
.TE
.sp
.sp
.bp
.sp
.H 4 "Description of the PL System Use Field"
.sp
The purpose of the "PL" System Use Field is to record the
location of the original parent Directory of a Directory which has
been relocated.
The field contains the Logical Block number of the
Logical Sector in which the first directory record of the original
parent Directory of said moved Directory is stored.
.sp
For each moved Directory which is recorded using a "CL" System
Use Field, a corresponding "PL" System Use Field is required.
The "PL" System Use Field shall be recorded in the System Use Area of the
second directory record ("dot-dot" entry) of the moved Directory.
No more than one "PL" System Use Field shall appear in (all) the System
Use Area(s) for a single directory record.
.sp
The format of the "PL" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "PL" type System Use Field.
The bytes in this field shall be (50)(4C) ("PL").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "PL" System Use Field.
The number in this field shall be 12 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "PL" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 to BP 12 - Location of Parent Directory" shall specify as a
32-bit number the Logical Block Number of the first Logical Block
allocated to the original parent directory of the moved directory.
This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
.LE
.sp
.sp
.TB "PL System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c.
X 	 	 	 	 
'P'	'L'	12	1	LOC of PARENT DIRECTORY
(BP1)	(BP2)	(BP3)	(BP4)	(BP5 to BP12)
X 	 	 	 	 
.TE
.sp
.sp
.bp
.sp
.H 4 "Description of the RE System Use Field"
.sp
The purpose of the "RE" System Use Field is to indicate to a
receiving system which can understand the System Use Fields "CL" and
"PL" that the directory record in which this "RE" System Use Field is
recorded has been relocated from another position in the original
directory tree.
.sp
An "RE" System Use Field shall not be recorded unless a corresponding 
"CL" System Use Field is recorded.
If recorded, a "RE" System Use Field shall be recorded in
the System Use Area of the directory record which describes the moved
Directory in the new parent directory of the moved Directory.
.sp
The format of the "RE" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "RE" type System Use Field.
The bytes in this field shall be (52)(45) ("RE").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "RE" System Use Field.
The number in this field shall be 4 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "RE" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LE
.sp
.sp
.TB "RE System Use Field - Version 1"
.TS
center,box;
c | c | c | c.
X 	 	 	 	 
'R'	'E'	4	1
(BP1)	(BP2)	(BP3)	(BP4)
X 	 	 	 	 
.TE
.sp
.sp
.bp
.sp
.TB "Deep Directory Relocation"
.sp
.sp
.PS
.ft 3
arrowhead = 7
box "1"
circle invis "(root)"
X
box "2a" at 1st box + (-2.5, -1.0)
box "2b" at 1st box + (-1.5, -1.0)
box "2c" at 1st box + (-.50, -1.0)
line from bottom of 1st box to top of 2nd box
line from bottom of 1st box to top of 3rd box
line from bottom of 1st box to top of 4th box
X
box "3" at 4th box + (-.50, -1.0)
line from bottom of 4th box to top of 5th box 
X
box "4" at 5th box + (-.50, -1.0)
box "8" at 5th box + (1.50, -1.0)
circle "\"RE\"" invis
line from bottom of 5th box to top of 6th box 
line from bottom of 5th box to top of 7th box 
line from bottom of 7th box  down .4 left .5 
line from bottom of 7th box  down .4 right .5 
X
box "5" at 6th box + (-.50, -1.0)
line from bottom of 6th box to top of 8th box 
X
box "6" at 8th box + (-.50, -1.0)
line from bottom of 8th box to top of 9th box 
X
box "7" at 9th box + (-.50, -1.0)
line from bottom of 9th box to top of 10th box 
X
ellipse "file" at 10th box + (-.50, -1.0)
line from bottom of 10th box to top of 1st ellipse 
X
arc -> from 1st ellipse + (.40, 0.0) to 7th box + (.20, -.55)
arc -> cw from 7th box + (-.20, -.55) to 10th box + (.40, 0.0) rad 3
circle invis "\"PL\"" at 8th box + (1.35, -1.0)
circle invis "\"CL\"" at 8th box + (2.55, -1.0)
.ft 1
.PE
.bp
.TB "Detailed Deep Directory Relocation"
.sp
.sp
.PS
.ft 3
move right 1.0
A: box invis  ht 0.2 wid 2.25 ; "   directory foo/ " at A.w ljust
Aa: box ht 0.2 wid 1.5 with .nw at A.sw ; "   \"dot\"" at Aa.w ljust
Ab: box ht 0.2 wid .75 with .sw at Aa.se ; "   rrip..." at Ab.w ljust
Ac: box ht 0.2 wid 1.5 with .nw at Aa.sw ; "   \"dotdot\"" at Ac.w ljust
Ad: box ht 0.2 wid .75 with .sw at Ac.se ; "   rrip..." at Ad.w ljust
B: box ht 0.2 wid 1.5 with .nw at Ac.sw ; "   bar" at B.w ljust
C: box ht 0.2 wid .75 with .sw at B.se ; "   rrip..." at C.w ljust
F: box ht 0.2 wid 1.5 with .nw at B.sw ; "   hidden_baz" at F.w ljust
G: box ht 0.2 wid .75 with .sw at F.se ; "   RE" at G.w ljust
H: box ht 0.2 wid 1.5 with .nw at F.sw ; "   lower" at H.w ljust
U: box ht 0.2 wid .75 with .sw at H.se ; "   rrip..." at U.w ljust
X
move down .4
move right 2.0
Y: box invis ht .2 wid .75 ; "   " at Y.w ljust
XX: ellipse ht .4 wid .75 with .nw at Y.sw "File"
X
move down .75
move left 1.5
I: box invis ht 0.2 wid 1.5 ; "   directory lower/" at I.w ljust
J: box ht 0.4 wid 2.55 with .nw at I.sw ; "          " at J.w ljust
K: box ht 0.2 wid .85 with .nw at J.sw ; "   empty_baz" at K.w ljust
L: box ht 0.2 wid .85 with .sw at K.se ; "   NM \"baz\"" at L.w ljust
M: box ht 0.2 wid .85 with .sw at L.se ; "   CL" at M.w ljust
X
move down .75
move left .25
Z: ellipse ht .4 wid .75 " File"
X
move down .75
N: box invis ht 0.2 wid 2.0 ; "  directory baz/ " at N.w ljust
O: box ht 0.2 wid 1.0 with .nw at N.sw ; "  \"dot\"" at O.w ljust
P: box ht 0.2 wid 1.0 with .sw at O.se ; "  rrip..." at P.w ljust
Q: box ht 0.2 wid 1.0 with .nw at O.sw ; "  \"dotdot\"" at Q.w ljust
R: box ht 0.2 wid 1.0 with .sw at Q.se ; "  PL" at R.w ljust
S: box ht 0.2 wid 1.0 with .nw at Q.sw ; "  " at S.w ljust
T: box ht 0.2 wid 1.0 with .sw at S.se ; "  " at T.w ljust
X
.\" BAR->FILE
arc <- from X.n to C.e rad 2.0
X
.\" HIDDEN_BAZ->DIR_BAZ
arc -> from F.w to O.w 
X
.\" LOWER->DIR_LOWER
arc -> cw from H.c to J.n rad 3
X
.\" EMPTY_BAZX->EMPTY_FILE
arc -> from K.s to Z.nw rad 3
X
.\" CL->DIR_BAZ
arc -> cw from M.c to P.n rad 2
X
.\" PL->DIR_LOWER
arc -> from R.c to J.ne rad .05
X
.ft 1
.PE
.bp
.sp
.sp
.H 3 "Description of the TF System Use Field"
.sp
The purpose of the "TF" System Use Field is to allow the
recording of a complete set of time stamps related to a file.
This System Use Field shall be optional.
If this field does not exist, the
POSIX st_atime, st_ctime and st_mtime should have the same value as
Recording Date and Time Field of the ISO 9660:1988 directory record.
If both the "TF" System Use Field and the XAR are present, the time
attributes stored in these two areas must be consistent.
If only the XAR is present, the st_atime should have the same value as the
Recording Date and Time Field of the ISO 9660 directory record.
.sp
Multiple "TF" fields may be recorded, using any combination of time
stamps and time formats, but each individual time stamp may be recorded
only once per directory record.
.sp
The format of the "TF" System Use Field is as follows:
.sp
.VL 12 5 
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "TF" type System Use Field.
The bytes in this field shall be (54)(46) ("TF").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "TF" System Use Field.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "TF" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 - Flags" shall contain bit field flags numbered 0
to 7 starting with the least significant bit as follows:
.sp
.TS
center;
c c l.
Position	Name	Interpretation if set to 1
\_	\_	\_
0	CREATION	Creation time recorded
1	MODIFY	Modification time recorded
2	ACCESS	Last Access time recorded
3	ATTRIBUTES	Last Attribute Change time recorded
4	BACKUP	Last Backup time recorded
5	EXPIRATION	Expiration time recorded
6	EFFECTIVE	Effective time recorded
7	LONG_FORM	ISO 9660 17-byte time format used
.TE
.sp
If the LONG_FORM bit is set to one, all time stamps in this "TF"
System Use Field shall be recorded using the format specified in
Section 8.4.26.1 of ISO 9660:1988.
If the LONG_FORM bit is set to zero, all time stamps in this "TF" 
System Use Field shall be recorded
using the format specified in Section 9.1.5 of ISO 9660:1988.
.LI "[4+N]"
"BP 6+(X*(N-1)) to 5+(X*N) Time Stamp" shall contain the Nth time
stamp indicated in [4] as being recorded, starting with the 0th
bit and working sequentially through the list of recordable time stamps.
The LONG_FORM bit does not indicate the presence or
absence of any time stamp.
The value of X in the expression above
shall be 17 if the LONG_FORM bit is set to 1, and 7 otherwise.
.LE
.bp
.sp
The recorded time for each of the time stamps recorded in this
field shall be local time.
if recorded, CREATION, Creation Time, has the same meaning as in
ISO 9660:1988 Format section 9.5.4.
.sp
If recorded, MODIFY, File Modification Date and Time, has the
same meaning as in ISO 9660:1988 Format section 9.5.5.
This field shall be used by the st_mtime for POSIX conformance.
.sp
If recorded, ACCESS, File Last Access Date and Time, shall
specify the date and time of the day at which the information in the
file was last accessed.
This field shall be used by the st_atime for POSIX conformance.
.sp
If recorded, ATTRIBUTES, Last Attribute Change Time,
shall be used by the st_ctime field for POSIX conformance.
.sp
If recorded, BACKUP, Last Backup Time, shall provide a time stamp
for the most recent backup of this file.
The utilization of this information is not restricted by this specification.
.sp
If recorded, EXPIRE, File Expiration Date and Time, has the same
meaning as in ISO 9660:1988 Format section 9.5.6.
.sp
If recorded, EFFECT File Effective Date and Time" has the same
meaning as in ISO 9660:1988 Format section 9.5.7.
.sp
.sp
.TB "TF System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c | c.
X 	 	 	 	 	 
'T'	'F'	LENGTH	1	FLAGS	TIME STAMPS
(BP1)	(BP2)	(BP3)	(BP4)	(BP5)	(BP6 to LENGTH)
X 	 	 	 	 	 
.TE
.sp
.sp
.sp
.H 3 "Description of the SF System Use Field"
.sp
The purpose of the "SF" System Use Field is to indicate that the 
file identified by the current directory record is stored as a "sparse" 
file, and to provide additional information which is necessary to
retrieve the file contents.
This System Use Field (and sparse file encoding) is optional.
No more than one "SF" System Use Field shall
appear in (all) the System Use Area(s) for a single directory record.
.sp
The "SF" field is specifically designed to provide support for the 
encoding and delivery of Unix-style sparse files in a platform-independent 
manner. The sparse file encoding allocates physical blocks only if the 
block actually contains non-zero data.
.bp
.sp
The format of the "SF" System Use Field is as follows:
.sp
.VL 10 5
.LI "[1]"
"BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
is a "SF" type System Use Field.
The bytes in this field shall be (53)(46) ("SF").
.LI "[2]"
"BP 3 - Length" shall specify as an 8-bit number the length in
bytes of the "SF" System Use Field.
The number in this field shall be 12 for this version.
This field shall be recorded according to ISO 9660:1988 Format 
section 7.1.1.
.LI "[3]"
"BP 4 - System Use Field Version" shall specify as an 8-bit number an
identification of the version of the "SF" System Use Field.
The number in this field shall be 1 for this version.
This field shall be recorded according to ISO 9660:1988 Format
section 7.1.1.
.LI "[4]"
"BP 5 to BP 12 - Virtual File Size" shall specify as a 32-bit
number the apparent size of the recorded data file, i.e. the size of the
file as reported on the originating (Unix) file system, or the offset
from the beginning of the file to the last application-addressable byte
in the file.  This field shall be recorded according to the ISO
9660:1988 Format section 7.3.3.
.LE
.sp
.sp
.TB "SF System Use Field - Version 1"
.TS
center,box;
c | c | c | c | c.
X 	 	 	 	 
'S'	'F'	LENGTH	1	VIRTUAL FILE SIZE
(BP1)	(BP2)	(BP3)	(BP4)	(BP5 to BP12)
X 	 	 	 	 
.TE
.sp
.H 4 "Encoding and Recording of Sparse Files"
.sp
Sparse Files are encoded within the File Section as specified in section
6.4.4.2 of the ISO 9660:1988.  The directory record Data Length as specified
in section 9.1.4 of the ISO 9660:1988 shall specify the length of the file 
section, including the SF Header Block, all Index Blocks, and the sparse file
data. 
.sp
The initial (number 0) 2K byte block of the File Section shall be an 
SF Header Block.
.sp
The format of the SF Header Block is identical to the format of the
SF System Use Field. All unused bytes in the SF header block shall be
set to binary zero (0).
.sp
The second (number 1) 2K byte block of the File Section shall be the 
first Index Block.
Each Index Block of an the encoded file shall hold 256 table entries.
.sp
Each Table Entry of an Index Block shall be eight bytes, recording
a 32 bit number as specified in section 7.3.3 of the ISO 9660:1988.
The value of each Table Entry is interpreted as a set of bit fields 
numbered 0 to 31 starting with the least significant bit as follows:
.TS
center;
c c l.
Bits	Name	Interpretation if set to 1
\_	\_	\_
0-23	BLOCK	24 bit logical block number. 
X		If the TABLE bit is set, this number is the 2K byte block 
X		  offset from the first block of the File Section to 
X		  the next block of table entries. 
X		If the TABLE bit is not set, this number is the 256 byte 
X		  block offset from the first block of the File Section
X		  to the first block of data referenced by this 
X		  Table Entry.
X		If the ZERO bit is set, this block number must be zero.
24-29	RESERVED	value must be 0. 
30	TABLE	This Table Entry's BLOCK pointer references a 2K block of 
X		256 Table Entries.
31	ZERO	This Table Entry specifies a file extent of data containing 
X		only zeros.
.TE
The TABLE and ZERO bits are mutually exclusive.
.sp
Each Table Entry of the first Index Block corresponds to the high-order 
byte of a 32 bit, linearly addressed file position. 
Any Table Entry in the first Index Block which has the TABLE bit set, has
a block pointer which refers to a logical 2K block (relative to the 
File Section) containing a second tier Index Block. Any Table Entry
with the ZERO bit set represents a logical file region of 16M bytes of zeros.
If the TABLE bit and the ZERO bit are both zero, then the BLOCK field of the 
Table Entry is a pointer
to the first logical block of a contiguous 16M byte region of data.
.sp
Each Table Entry of a second tier Index Block corresponds to the second
most significant byte of a 32 bit, linearly addressed file position.
Any Table Entry in a second tier Index Block which
has the TABLE bit set, has a block pointer which refers to a logical
2K block (relative to the File Section) containing a third tier Index
Block. Any Table Entry with the ZERO bit set represents a logical file region
of 64K bytes of zeros.
If the TABLE bit and the ZERO bit are both zero, then the BLOCK field of the 
Table Entry is a pointer
to the first logical block of a contiguous 64K byte region of data.
.sp
Each Table Entry of a third tier Index Block corresponds to the third 
most significant byte of a 32 bit, linearly addressed file position. 
The block pointer refers to a logical
256 byte block (relative to the File Section) which contains 256 bytes
of actual data.  A Table Entry with the ZERO bit set represents a logical 
file region of 256 bytes of zeros. No Table Entry in a third tier Index Block 
may have the TABLE bit set. 
If the TABLE bit and the ZERO bit are both zero, then the BLOCK field of the 
Table Entry is a pointer
to the first logical block of a contiguous 256 byte region of data.
.sp
The positions of these 256 byte data blocks shall be numbered
with data block number 0 being coincident with the first 256 bytes of
block 0 of the encoded file.  Thus the first 2K byte block of the file,
which actually holds the high-order byte addressing table, would consume
data block positions 0 to 3, and data block 495 (= 123*4 + 3) would be
bytes 768 to 1023 located in the 123rd physical 2K byte block of the
encoded file.  Though the data may be efficiently recorded in
sequentially numbered blocks, ordered according to increasing address of
the recorded data, this is not required.
.sp
The second and third tier index blocks (if needed) may be recorded 
in sequentially numbered blocks, after the first index block, but before the 
first data block, although this is not required.
.sp
.sp
.sp
.H 2 "Required Recording and Consistency"
.sp
The "PX" System Use Fields shall be recorded in every directory
record.
All recorded instances of the "PX" and "TF" System Use Fields
in directory records referring to a single directory must be
consistent.
.bp
.sp
.H 2 "Specification of the ER System Use Field Values for RRIP"
.sp
The Extension Version number for the version of the RRIP defined
herein shall be 1.
The content of the Extension Identifier field shall be "RRIP_1991A".
The Identifier Length shall be 10.
.sp
The recommended content of the Extension Descriptor shall be "THE
ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM
SEMANTICS."
The corresponding Description Length is 84.
.sp
The recommended content of the Extension Source shall be "PLEASE
CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE.  SEE PUBLISHER
IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION."
The corresponding Source Length is 135.
.sp
.bp
.\" Blank page for back of this chapter
.ce 
X       
X        
X       
X         
SHAR_EOF
chmod 0644 rrip.nr ||
echo 'restore of rrip.nr failed'
Wc_c="`wc -c < 'rrip.nr'`"
test 37392 -eq "$Wc_c" ||
	echo 'rrip.nr: original size 37392, current size' "$Wc_c"
fi
# ============= bib.nr ==============
if test -f 'bib.nr' -a X"$1" != X"-c"; then
	echo 'x - skipping bib.nr (File already exists)'
else
echo 'x - extracting bib.nr (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'bib.nr' &&
.sp
.H 1 "BIBLIOGRAPHY"
.sp
.BL
.LI
ISO 9660:1988 - Information Processing - Volume and file structure of
CD-ROM for information interchange
.LI
IEEE Standard Portable Operating System Interface for Computer Environments,
IEEE std 1003.1-1988 (a.k.a POSIX Standard), New York, New York:IEEE
.LI
System Use Sharing Protocol, IEEE CDFSF Rev 1.10
.LE
SHAR_EOF
chmod 0644 bib.nr ||
echo 'restore of bib.nr failed'
Wc_c="`wc -c < 'bib.nr'`"
test 348 -eq "$Wc_c" ||
	echo 'bib.nr: original size 348, current size' "$Wc_c"
fi
# ============= TOC ==============
if test -f 'TOC' -a X"$1" != X"-c"; then
	echo 'x - skipping TOC (File already exists)'
else
echo 'x - extracting TOC (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'TOC' &&
.TC 1 1 4
SHAR_EOF
chmod 0644 TOC ||
echo 'restore of TOC failed'
Wc_c="`wc -c < 'TOC'`"
test 10 -eq "$Wc_c" ||
	echo 'TOC: original size 10, current size' "$Wc_c"
fi
exit 0
