Home | History | Annotate | Download | only in cd9660
History log of /src/usr.sbin/makefs/cd9660/iso9660_rrip.c
RevisionDateAuthorComments
 1.17  17-Feb-2025  andvar s/bye/byte/ in comments.
 1.16  18-Apr-2023  christos branches: 1.16.2;
We previously attempted to emit Rock Ridge NM records only when the name
represented by the Rock Ridge extensions would actually differ. We would
omit the record for an all-upper-case directory name, however Linux (and
perhaps other operating systems) map names with no NM record to
lowercase.

This affected only directories, as file names have an implicit ";1"
version number appended and thus always differ. To solve, just emit NM
records for all entries other than DOT and DOTDOT .

We could continue to omit the NM record for directories that would avoid
mapping (for example, one named 1234.567) but this does not seem worth
the complexity.

From FreeBSD https://reviews.freebsd.org/D39258
 1.15  18-Apr-2023  christos The bit definitions for the TF_* timestamp bits (TF_MODIFY, etc.) were
incorrect, and timestamps were written in the wrong order.

See RRIP 4.1.6 Description of the "TF" System Use Entry for details.

From: https://reviews.freebsd.org/D39221
 1.14  30-May-2014  martin PR kern/48852 (which should have been bin/ in retrospect): apply patch
from Thomas Schmitt to fix rockridge encoding of device nodes.
 1.13  30-Jul-2013  reinoud branches: 1.13.2;
`makefs -t cd9660' fix from FreeBSD:
Submitted by: Thomas Schmitt via marius@freebsd.org
Obtained from: FreeBSD r253707

- Correctly set the Expiration Time in the Primary Volume Descriptor;
according to ISO 9660 8.4.26.1 unspecified date and time are denoted by the
digit 0 in RBP 1 to 16 but the number 0 in RBP 17.

- Rock Ridge TF entries should use a length of 5, because after the 4 bytes of
generic SUSP header there is one byte of flags. See typedef of ISO_RRIP_TF
in iso9660_rrip.h.
 1.12  28-Jan-2013  christos - use emalloc and friends
- kill a bunch of global variables, more work to be done here
- homogenize option parsing. more work for cd9660
- use the new options parsing code to print an fs-specific usage
 1.11  29-Apr-2012  joerg branches: 1.11.2;
usage is dead. name_len should be read as unsigned byte.
 1.10  29-May-2011  tsutsui branches: 1.10.4;
Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs):
- makefs/cd9660.c:
- cd9660_rrip_move_directory() should also update lenght[0] and
name_len[0] in dir->isoDirRecord
- makefs/cd9660/iso9660_rrip.c:
- cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
not in node itself in RRIP_PL case
- cd9660_rrip_initialize_node() should update only node passed as arg
so handle RRIP_PL in DOTDOT case

Fixes malformed dotdot entries in deep (more than 8 level) directories
moved into .rr_moved dir.

Should be pulled up to netbsd-5.
(no official ISO has such deep dirs, but cobalt restorecd is affected)
 1.9  28-May-2011  tsutsui - remove unnecessary (pasto?) line on RRIP PL handling for moved dir
- RRIP RE length should be 4, not 0
 1.8  10-Jan-2009  bjh21 Add support for encoding RISC OS metadata into ISO 9660 filesystems.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support. I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way. Tested against RISC OS 3.70 on my Risc PC.

Oh, why do we want it? It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
 1.7  10-Jan-2009  he Initialize a local variable to get rid of a "may be used uninitialized"
warning (turned into error by -Werror).
 1.6  09-Jan-2009  bjh21 Fix another bug in SUSP "CE" handling: when the SUSP records fit into
the System Use field with fewer then 28 bytes to spare, we were
remembering the wrong length for the System Use field and hence
emitting a corrupt directory entry. This could be triggered by trying
to build a filesystem containing a regular file with a 120-byte name.
Now we're a little more careful.
 1.5  08-Jan-2009  bjh21 When splitting a System Use Area between a System Use field and a
Continuation Area, be sure to insert the "CE" record at the correct
point in the chain of SUSP records. Without this, makefs emits
an invalid image if any file needs a Continuation Area. The bug
seems to have been introduced with the conversion to TAILQs.
 1.4  18-Dec-2006  christos branches: 1.4.18; 1.4.20; 1.4.22;
from Anon Ymous: compile with -Wextra
 1.3  30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 1.2  25-Oct-2005  dyoung Overhaul makefs -t cd9660.

Functional: Do not add a missing period or a version number to
directories, since that doesn't fit the standard (thanks
Daniel Watt).

Add RRIP PX records (POSIX meta-information) to '.'
and '..' entries. Quiets kernel complaint, when we
mount a cd9660 filesystem, that there is a missing PX
entry.

Cosmetic: Reduce height of staircases. Remove an unused member
from struct _cd9660node. Extract a subroutine. KNF.

Use a TAILQ macros for lists of both SUSP/RRIP attributes
and directory entries.

XXX
XXX The new RRIP PX entries are not quite right.
XXX
 1.1  13-Aug-2005  fvdl cd9660 support. Written by Daniel Watt, Walter Deignan, Ryan Gabrys,
Alan Perez-Rathke and Ram Vedam.

Prototyping, KNF, WARNS=3 by me.

Note that this is marked experimental for now. It works well enough to
make NetBSD/i386 bootable images, but does need more work.
 1.4.22.1  21-Apr-2010  matt sync to netbsd-5
 1.4.20.4  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660.c: revision 1.25 via patch
usr.sbin/makefs/cd9660.h: revision 1.13 via patch
usr.sbin/makefs/cd9660/cd9660_write.c: revision 1.10
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.8
usr.sbin/makefs/cd9660/iso9660_rrip.h: revision 1.5
Add support for encoding RISC OS metadata into ISO 9660 filesystems.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support. I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way. Tested against RISC OS 3.70 on my Risc PC.
Oh, why do we want it? It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
 1.4.20.3  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.7
Initialize a local variable to get rid of a "may be used uninitialized"
warning (turned into error by -Werror).
 1.4.20.2  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.6
Fix another bug in SUSP "CE" handling: when the SUSP records fit into
the System Use field with fewer then 28 bytes to spare, we were
remembering the wrong length for the System Use field and hence
emitting a corrupt directory entry. This could be triggered by trying
to build a filesystem containing a regular file with a 120-byte name.
Now we're a little more careful.
 1.4.20.1  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.5
When splitting a System Use Area between a System Use field and a
Continuation Area, be sure to insert the "CE" record at the correct
point in the chain of SUSP records. Without this, makefs emits
an invalid image if any file needs a Continuation Area. The bug
seems to have been introduced with the conversion to TAILQs.
 1.4.18.5  15-Jul-2011  riz Pull up following revision(s) (requested by tsutsui in ticket #1638):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.9
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.10
usr.sbin/makefs/cd9660.c: revision 1.30
- remove unnecessary (pasto?) line on RRIP PL handling for moved dir
- RRIP RE length should be 4, not 0
Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs):
- makefs/cd9660.c:
- cd9660_rrip_move_directory() should also update lenght[0] and
name_len[0] in dir->isoDirRecord
- makefs/cd9660/iso9660_rrip.c:
- cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
not in node itself in RRIP_PL case
- cd9660_rrip_initialize_node() should update only node passed as arg
so handle RRIP_PL in DOTDOT case
Fixes malformed dotdot entries in deep (more than 8 level) directories
moved into .rr_moved dir.
Should be pulled up to netbsd-5.
(no official ISO has such deep dirs, but cobalt restorecd is affected)
 1.4.18.4  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660.c: revision 1.25 via patch
usr.sbin/makefs/cd9660.h: revision 1.13 via patch
usr.sbin/makefs/cd9660/cd9660_write.c: revision 1.10
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.8
usr.sbin/makefs/cd9660/iso9660_rrip.h: revision 1.5
Add support for encoding RISC OS metadata into ISO 9660 filesystems.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support. I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way. Tested against RISC OS 3.70 on my Risc PC.
Oh, why do we want it? It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
 1.4.18.3  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.7
Initialize a local variable to get rid of a "may be used uninitialized"
warning (turned into error by -Werror).
 1.4.18.2  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.6
Fix another bug in SUSP "CE" handling: when the SUSP records fit into
the System Use field with fewer then 28 bytes to spare, we were
remembering the wrong length for the System Use field and hence
emitting a corrupt directory entry. This could be triggered by trying
to build a filesystem containing a regular file with a 120-byte name.
Now we're a little more careful.
 1.4.18.1  02-Jan-2010  snj Pull up following revision(s) (requested by tsutsui in ticket #1198):
usr.sbin/makefs/cd9660/iso9660_rrip.c: revision 1.5
When splitting a System Use Area between a System Use field and a
Continuation Area, be sure to insert the "CE" record at the correct
point in the chain of SUSP records. Without this, makefs emits
an invalid image if any file needs a Continuation Area. The bug
seems to have been introduced with the conversion to TAILQs.
 1.10.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.4.1  23-May-2012  yamt sync with head.
 1.11.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1  25-Feb-2013  tls resync with head
 1.13.2.1  10-Aug-2014  tls Rebase.
 1.16.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed