History log of /freebsd-current/usr.sbin/makefs/cd9660/cd9660_write.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 79ead084 17-Apr-2023 Ed Maste <emaste@FreeBSD.org>

makefs: remove unused variable

Reported by: Clang
Sponsored by: The FreeBSD Foundation


# 2f11df63 30-Mar-2023 Ed Maste <emaste@FreeBSD.org>

makefs: remove CD9660MAXPATH #define

It was used only in constructing the host path that contains file
content, which is not related to anything CD9660-specific. PATH_MAX is
the appropriate limit. See OpenBSD commit 299d8950f319.

Obtained from: OpenBSD
Sponsored by: The FreeBSD Foundation


# 06a400d7 20-Sep-2022 Ed Maste <emaste@FreeBSD.org>

makefs: whitespace cleanup (remove space before tab)

MFC after: 1 week


# 164fa411 06-Feb-2022 Gordon Bergling <gbe@FreeBSD.org>

makefs(8): Fix a few typos in source code comments

- s/concearned/concerned/
- s/quadradically/quadratically/

Obtained from: NetBSD
MFC after: 3 days


# fe41c64b 06-Jan-2021 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>

Fix -Wpointer-sign warnings in makefs and mkimg

Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D27175


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 37ca9f42 06-Apr-2017 Ed Maste <emaste@FreeBSD.org>

makefs: Sync with NetBSD (fix unused variable warnings)

NetBSD revs:
cd9660.c 1.45
cd9660/cd9660_write.c 1.17

Obtained from: NetBSD


# 5f5598b1 06-Apr-2017 Ed Maste <emaste@FreeBSD.org>

makefs: use emalloc and friends

The emalloc set of error-checking memory allocation routines were added
to libnetbsd in r316572. Use them in makefs to reduce differences with
NetBSD.

NetBSD revs:
cd9660.c 1.39
ffs.c 1.56
makefs.c 1.42
walk.c 1.27
cd9660/cd9660_archimedes.c 1.2
cd9660/cd9660_eltorito.c 1.20
cd9660/cd9660_write.c 1.16
cd9660/iso9660_rrip.c 1.12
ffs/buf.c 1.17
ffs/mkfs.c 1.26

Obtained from: NetBSD


# 1631d42a 22-Feb-2017 Ed Maste <emaste@FreeBSD.org>

makefs: eliminate global cd9660 structure

For diff reduction with NetBSD

NetBSD file versions:
cd9660.c 1.39
cd9660.h 1.19
cd9660/cd9660_debug.c 1.12
cd9660/cd9660_eltorito.c 1.20
cd9660/cd9660_write.c 1.16
cd9660/iso9660_rrip.c 1.12
cd9660/iso9660_rrip.h 1.6

Reviewed by: ngie
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9627


# 42afd55d 20-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Unbreak makefs -t cd9660 after r289687

buffer_head needs to be freed -- not buffer

Detected by jemalloc, i.e. running makefs failed the arena assert
because my copy of malloc on CURRENT is compiled with the default
!MALLOC_PRODUCTION asserts on

Pointyhat to: ngie
PR: 203647
X-MFC with: r289687
Sponsored by: EMC / Isilon Storage Division


# b73321f0 21-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Free buffer before returning from cd9660_write_path_table to avoid
leaking it after returning from the function

MFC after: 1 week
PR: 203647
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 978431
Sponsored by: EMC / Isilon Storage Division


# 688aaa09 30-Jan-2012 Jung-uk Kim <jkim@FreeBSD.org>

Allow contents of multiple directories to be merged to the current image.
Note this patch was submitted to NetBSD and they already adopted it.

http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html

MFC after: 1 week


# 3df5ecac 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for usr.sbin/


# 852f933d 10-Aug-2011 Marius Strobl <marius@FreeBSD.org>

Sync makefs(8) ISO 9660 support with NetBSD:
o cd9960 -> cd9660
o 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.
o Fix fd leaks in error cases. Found by cppcheck.
o RRIP RE length should be 4, not 0
o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs), iso9660_rrip.c part:
- 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)

Reviewed by: mm
Approved by: re (kib)
Obtained from: NetBSD
MFC after: 3 days


# 484b5c25 19-Jun-2011 Marcel Moolenaar <marcel@FreeBSD.org>

Add support for using mtree(5) manifest files to define the image
to be created. The support is based on mtree version 2.0, as used
in libarchive, but adds new features on top of it.

The current implementation is fully functional, but is envisioned
to grow at least the following additional features over time:
o Add support for the /include special command so that manifest
files can be constructed using includable fragments.
o Add support specifying a search path to locate content files.
o Content file filters: commands that provide file contents on
stdout.

The manifest file eliminates the need to first construct a tree
as root in order to create an image and allows images (releases)
to be created directly from object trees and/or source trees.

Reviewed by: deo
Sponsored by: Juniper Networks, Inc


# 01a0f853 07-Nov-2010 Olivier Houchard <cognet@FreeBSD.org>

Sync with the latest version from NetBSD. It notably addds ISO9660 support.

Submitted by: bapt