History log of /netbsd-current/usr.sbin/makefs/cd9660/cd9660_eltorito.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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


Revision tags: netbsd-10-0-RC1 netbsd-10-base
# 1.25 09-Apr-2022 riastradh

makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330
# 1.23 28-Mar-2018 nonaka

Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.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


Revision tags: netbsd-10-base
# 1.25 09-Apr-2022 riastradh

makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330
# 1.23 28-Mar-2018 nonaka

Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.25 09-Apr-2022 riastradh

makefs(8): Nix trailing whitespace.

Computed by machine, eyeballed by hand, so to speak.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330
# 1.23 28-Mar-2018 nonaka

Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.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.


Revision tags: netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330
# 1.23 28-Mar-2018 nonaka

Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330
# 1.23 28-Mar-2018 nonaka

Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

branches: 1.21.4;
makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.22 09-Nov-2017 nonaka

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.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.21 24-Jan-2017 nonaka

makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.21 24-Jan-2017 nonaka

makefs(8): add cd9660 eltorito-alt-boot option for EFI boot.


Revision tags: netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.20 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


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5
# 1.19 19-Apr-2012 christos

branches: 1.19.2;
WARNS=5


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 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.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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!


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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.