Home | History | Annotate | only in /src/usr.sbin/makefs/cd9660
History log of /src/usr.sbin/makefs/cd9660
RevisionDateAuthorComments
 1.3 10-Aug-2012  joerg Remove many HAVE_GCC || HAVE_PCC conditionals as the options also apply
to Clang. Add a few cases of HAVE_LLVM for -fno-strict-aliasing.
 1.2 20-Jun-2011  mrg branches: 1.2.2;
remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
 1.1 16-Jan-2009  pooka branches: 1.1.6;
Move fs-specific stuff in Makefile to fs/Makefile.inc to clarify
top-level Makefile.
 1.1.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.3 09-Apr-2022  riastradh makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.
 1.2 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.1 10-Jan-2009  bjh21 branches: 1.1.8; 1.1.14;
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.1.14.1 25-Feb-2013  tls resync with head
 1.1.8.1 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.2 09-Apr-2022  riastradh makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.
 1.1 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.6 17-Jun-2024  reinoud We know the target string buffer only needs 18 but gcc can't figure this out.
Fixes compiling with -Werror=format-truncation
 1.5 08-Feb-2017  christos If we are using a timestamp from the command line, don't pay attention to
the user timezone, use UTC instead (for reproducible builds).
 1.4 14-Mar-2007  christos branches: 1.4.58; 1.4.62;
PR/36006: Takahiro Kambe: makefs(8) create cd9660 file system with wrong time
stamp because localtime(3) and gmtime(3) share the same buffer. Fixed by using
the _r functions.
 1.3 24-Dec-2005  perry branches: 1.3.4;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 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.3.4.1 31-Mar-2007  bouyer Pull up following revision(s) (requested by taca in ticket #539):
usr.sbin/makefs/cd9660/cd9660_conversion.c: revision 1.4
PR/36006: Takahiro Kambe: makefs(8) create cd9660 file system with wrong time
stamp because localtime(3) and gmtime(3) share the same buffer. Fixed by using
the _r functions.
 1.4.62.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.58.1 20-Mar-2017  pgoyette Sync with HEAD
 1.14 28-Dec-2023  tsutsui Use EXIT_SUCCESS and EXIT_FAILURE where appropriate per style guide.
 1.13 19-Oct-2013  christos fix unused variable warnings.
 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 27-Oct-2010  christos branches: 1.11.6; 1.11.12;
Handle > 2GB images. Thanks to Greg Troxel for testing!
 1.10 22-Oct-2010  christos - simple fseek->fseeko conversion. probably needs more work.
- use a constant instead of sprinkling 2048 everywhere.
 1.9 08-Jan-2009  bjh21 Typo: debuging -> debugging.
 1.8 30-Jan-2007  dogcow emasculate debugging mode for the hosttool version of makefs, to avoid various
hairy endian-decoding macros/inlined functions/etc.
 1.7 28-Jan-2007  dogcow revert this change, too.
 1.6 28-Jan-2007  dogcow Due to recent changes in the cd9660 code, crosscompilation of tools/makefs
now fails due to the use of [be]e{16,32}dec. Add a compat header, and force
the inclusion of <sys/endian.h>.
 1.5 18-Dec-2006  christos from Anon Ymous: compile with -Wextra
 1.4 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 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.11.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.12.1 25-Feb-2013  tls resync with head
 1.11.6.1 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.27 28-Dec-2023  tsutsui Use EXIT_SUCCESS and EXIT_FAILURE where appropriate per style guide.
 1.26 18-Apr-2023  christos The boot catalog pointer is a DWord, but we previously populated it via
cd9660_bothendian_dword which overwrote four unused bytes following it.
See El Torito 1.0 (1995) Figure 7 for details.

Found by Coverity on FreeBSD
 1.25 09-Apr-2022  riastradh makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.
 1.24 15-Nov-2020  jmcneill Add "efi" as a supported boot image type and derive the platform ID for
the validation entry from the default boot image instead of hard-coding
X86.
 1.23 28-Mar-2018  nonaka Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.
 1.22 09-Nov-2017  nonaka branches: 1.22.2;
Initialize boot_catalog_entry's entry_type properly.

This had been missing but the type was used in cd9660_setup_boot().

From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.
 1.21 24-Jan-2017  nonaka branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.
 1.20 28-Jan-2013  christos branches: 1.20.12; 1.20.16;
- 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.19 19-Apr-2012  christos branches: 1.19.2;
WARNS=5
 1.18 02-Apr-2012  christos Pull FreeBSD fix from Andreas Tobbler:

- Write the ISO9660 descriptor after the apm partition entries.
- Fill the needed pmPartStatus flags. At least the OpenBIOS
implementation relies on these flags.

This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc.
Additionally OpenBIOS recognizes the partition where the boot code is located.
This lets us load a FreeBSD/ppc PowerMac kernel inside qemu.
 1.17 23-Jun-2011  enami branches: 1.17.2;
Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
since actual user is not cd9660_eltorito.c but iso.h and
cd9660_eltorito.h.

Actually, include order/place of sys/endian.h doesn't matter on
netbsd since it is always included by sys/types.h but it's not
true on other system. This should fix cross build breakage on
freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
Problem reported and fix suggested on twitter.
 1.16 23-May-2011  christos include system headers after config.h
 1.15 22-May-2011  christos From Nathan Whitehorn (nwhitehorn at freebsd dot org):
Add code to generate bootable ISOs on Powermac and CHRP systems.
Synthesize some partition maps (APM and MBR, respectively) pointing
to (a) the whole disk, and (b) relevant El Torito boot images that
have been added by other code. These partition maps are a little
bit funny looking, but they seem to work. FreeBSD has been using
this successfully in their release generation on powerpc, as well
as generating all non-SPARC install media. SPARC support could
probably be added as an extension of this patch.
 1.14 27-Oct-2010  christos Handle > 2GB images. Thanks to Greg Troxel for testing!
 1.13 22-Oct-2010  christos - simple fseek->fseeko conversion. probably needs more work.
- use a constant instead of sprinkling 2048 everywhere.
 1.12 27-Jul-2008  reinoud Fix typo in cd9660 functionname cd9660_setup_boot_volume_descritpor ->
cd9660_setup_boot_volume_descriptor.

Interestingly the same typo was used in 3 files!
 1.11 22-Apr-2006  christos branches: 1.11.20;
Coverity CID 548: Fix resource leak.
 1.10 31-Oct-2005  dyoung Oops, condition another printf on verbose_level > 0.
 1.9 31-Oct-2005  dyoung Condition several cd9660 printfs on verbose_level > 0. Silences
makefs -t cd9660.
 1.8 30-Oct-2005  dyoung Now that I understand what order boot-images and boot-entries are
intended to be kept on the boot-images and -entries lists, keep
them in that order: images grouped and entries grouped by system,
with later images nearer the front of the list.

*Really* apply boot options to the last boot-image specified.
 1.7 30-Oct-2005  dyoung Bug fix: record the actual number number of 512-byte "virtual"
sectors in the Sector Count field of the Initial/Default Entry in
the "El Torito" Boot Catalog, instead of blithely writing 1 (!!)
into the Sector Count field. Ditto the Section Entries.

Remove last remnants of cd9660's unsupported boot-load-size option.

Really use cd9660's boot-load-segment argument.

Change the boot images list from a LIST to a TAILQ.

Re-implement CD9660_BLOCKS() with howmany().

Introduce ELTORITO_DPRINTF and some debug messages.

Zero memory malloc'd in the El Torito code.

Revise some debugging outputs.

Insert a new boot-image on the boot-images list after the last
boot-image for the same architecture. It makes a (trivial) functional
difference.

Miscellaneous cosmetic changes. Remove useless variable-assignment.
 1.6 30-Oct-2005  dyoung Cosmetic: add temporary variables for lengthy, repeated clauses
like 'default_entry->entry_data.IE'. KNF.
 1.5 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 1.4 28-Oct-2005  dyoung Correct strcmp(3) usage (expect equal -> 0).
 1.3 28-Oct-2005  dyoung Use LIST_ macros instead of accessing list structure members lh_first
and le_next directly.
 1.2 19-Aug-2005  dyoung Change from malloc/strcpy idiom to strdup.

Revamp err, errx, warn, warnx usage.

Misc. cosmetic tweaks.

Make -o bootimage=sysname;filename expect NetBSD architecture names
(x86 -> i386; mac -> {macppc, mac68k}; ppc -> powerpc) for sysname.
 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.11.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.2.3 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.17.2.2 23-May-2012  yamt sync with head.
 1.17.2.1 17-Apr-2012  yamt sync with head
 1.19.2.1 25-Feb-2013  tls resync with head
 1.20.16.1 21-Apr-2017  bouyer Sync with HEAD
 1.20.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.21.4.1 30-Mar-2018  martin Pull up following revision(s) (requested by nonaka in ticket #660):
usr.sbin/makefs/cd9660/cd9660_eltorito.c: revision 1.22
usr.sbin/makefs/cd9660/cd9660_eltorito.c: revision 1.23

Initialize boot_catalog_entry's entry_type properly.

This had been missing but the type was used in cd9660_setup_boot().
From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.

Correctly mark the last El Torito section header.
Pointed out by Benno Rice via DM.
 1.22.2.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.6 24-Jan-2017  nonaka makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.
 1.5 04-Jul-2009  ahoka branches: 1.5.28; 1.5.32;
Get rid of the DOS line endings in the file.
No change of the code intended.
 1.4 30-Oct-2005  dyoung Now that I understand what order boot-images and boot-entries are
intended to be kept on the boot-images and -entries lists, keep
them in that order: images grouped and entries grouped by system,
with later images nearer the front of the list.

*Really* apply boot options to the last boot-image specified.
 1.3 30-Oct-2005  dyoung Bug fix: record the actual number number of 512-byte "virtual"
sectors in the Sector Count field of the Initial/Default Entry in
the "El Torito" Boot Catalog, instead of blithely writing 1 (!!)
into the Sector Count field. Ditto the Section Entries.

Remove last remnants of cd9660's unsupported boot-load-size option.

Really use cd9660's boot-load-segment argument.

Change the boot images list from a LIST to a TAILQ.

Re-implement CD9660_BLOCKS() with howmany().

Introduce ELTORITO_DPRINTF and some debug messages.

Zero memory malloc'd in the El Torito code.

Revise some debugging outputs.

Insert a new boot-image on the boot-images list after the last
boot-image for the same architecture. It makes a (trivial) functional
difference.

Miscellaneous cosmetic changes. Remove useless variable-assignment.
 1.2 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 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.5.32.1 21-Apr-2017  bouyer Sync with HEAD
 1.5.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 01-Feb-2006  dyoung Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 1.2 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 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.2 01-Feb-2006  dyoung Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 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.6 24-Dec-2015  christos little size_t/ssize_t...
 1.5 23-Mar-2011  christos Fix typos in character ranges from: Baptiste Daroussin bapt at freebsd dot org
 1.4 16-Jan-2007  hubertf * Don't include headers twice
* Remove a few trailing whitespaces
* Rearrange and join to one #if for some headers

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
 1.3 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 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.3 01-Feb-2006  dyoung Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 1.2 30-Oct-2005  dyoung Remove invisible whitespace at ends of lines that disrupted my
speedy cursor-movement habits in vi.
 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.18 28-Dec-2023  tsutsui Use EXIT_SUCCESS and EXIT_FAILURE where appropriate per style guide.
 1.17 19-Oct-2013  christos fix unused variable warnings.
 1.16 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.15 28-Jan-2012  christos branches: 1.15.6;
Patch from Jung-uk Kim (jkim at FreeBSD dot org) to allow contents of multiple
directories to be merged to the current image.
 1.14 04-Jan-2011  wiz branches: 1.14.6;
Fix fd leaks in error cases. Found by cppcheck.
 1.13 22-Oct-2010  christos - simple fseek->fseeko conversion. probably needs more work.
- use a constant instead of sprinkling 2048 everywhere.
 1.12 22-Nov-2009  mbalmer make sense
 1.11 22-Nov-2009  mbalmer s/the the/the/
 1.10 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.9 10-May-2008  skrll branches: 1.9.4; 1.9.6; 1.9.8;
Add an option to load a generic boot image into the first 32K of the
cd9660 image.
 1.8 22-Apr-2006  christos branches: 1.8.18; 1.8.20;
Coverity CID 550: Resource leak.
 1.7 23-Mar-2006  riz Coverity CID 2757: Don't leak memory in error conditions.
 1.6 31-Oct-2005  dyoung Remove the cd9660_inode hashtable for hard-links support, and re-use
the fsinode for the same purpose, per Luke Mewburn's suggestion on
source-changes@.
 1.5 30-Oct-2005  dyoung Add hard-link support: keep a hashtable that maps inodes for
regular files on the source filesystem to the offset of the first
data block on the target filesystem. Don't allocate blocks for a
file a second time (i.e., if it is already present in the hashtable).
Avoid writing the blocks of a file twice (use the FS_WRITTEN flag
in fsinode->flags for this purpose).
 1.4 30-Oct-2005  dyoung Normalize {err,warn}{,x} uses.
 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.8.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.18.1 18-May-2008  yamt sync with head.
 1.9.8.1 21-Apr-2010  matt sync to netbsd-5
 1.9.6.1 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.9.4.1 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.14.6.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.14.6.1 17-Apr-2012  yamt sync with head
 1.15.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.6.1 25-Feb-2013  tls resync with head
 1.3 01-Feb-2006  dyoung Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 1.2 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 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.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
 1.8 18-Apr-2023  christos See RRIP 4.1.4 Description of the "NM" System Use Entry for details.

From FreeBSD
 1.7 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.6 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.5 10-Jan-2009  bjh21 branches: 1.5.8; 1.5.14;
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 01-Feb-2006  dyoung branches: 1.4.26; 1.4.28; 1.4.30;
Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 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.30.1 21-Apr-2010  matt sync to netbsd-5
 1.4.28.1 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.26.1 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.5.14.1 25-Feb-2013  tls resync with head
 1.5.8.1 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.2 01-Feb-2006  dyoung Stop duplicating the ISO9660 sources in sys/fs/cd9660/ for makefs(8).
 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.

RSS XML Feed