Commit Graph

15 Commits

Author SHA1 Message Date
Ed Maste
10854bf517 makefs: use unsigned and %u for rock_ridge_move_count
For diff reduction against NetBSD's makefs.  Based on NetBSD git mirror
commit 00991aee8248.

With this change our makefs cd9660 support should be in sync up to
NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace.").

Sponsored by:	The FreeBSD Foundation
2023-04-17 08:21:28 -04:00
Ed Maste
c753f49f70 makefs: remove unused cd9660 options
Makefs defined "follow-symlinks" and "help" options, but they did
nothing.  Remove them.

Obtained from:	OpenBSD a8f1645688c2
Sponsored by:	The FreeBSD Foundation
2023-04-16 09:38:02 -04:00
Ed Maste
1d1ffa2efd makefs: use size_t or ssize_t where appropriate
Obtained from:	NetBSD af7bc97830ac
2023-04-10 18:50:27 -04:00
Ed Maste
d73acb32d3 makefs: remove some unused cd9660 types and defines
Obtained from:	OpenBSD
Sponsored by:	The FreeBSD Foundation
2023-04-10 11:15:34 -04:00
Ed Maste
2f11df6337 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
2023-04-05 14:05:49 -04:00
Ed Maste
06a400d76b makefs: whitespace cleanup (remove space before tab)
MFC after:	1 week
2022-09-20 10:26:24 -04:00
Alex Richardson
fe41c64b57 Fix -Wpointer-sign warnings in makefs and mkimg
Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27175
2021-01-07 09:26:21 +00:00
Pedro F. Giffuni
1de7b4b805 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.
2017-11-27 15:37:16 +00:00
Ed Maste
cfa6282553 makefs: sync with NetBSD
This is a collection of minor changes as diff reduction against NetBSD.

NetBSD revs:
cd9660.c		1.39
cd9660.h		1.19
makefs.c		1.34

Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2017-03-29 20:49:41 +00:00
Ed Maste
776c68249b makefs: sync option parsing with NetBSD
- add support for parsing different types; not just int
- homogenize option parsing
- fix single letter parsing
- remove duplicated code

NetBSD revisions:
cd9660.c        1.36 1.37 1.38 1.41 1.42 1.43
ffs.c           1.50 1.51 1.52 1.53 1.56 1.57
makefs.c        1.36 1.37 1.38 1.39 1.40 1.42 1.43 1.44 1.46
makefs.h        1.28 1.29 1.31 1.32

Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2017-03-15 13:34:51 +00:00
Ed Maste
1631d42aa6 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
2017-02-23 02:28:08 +00:00
Jung-uk Kim
688aaa098d 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
2012-01-31 00:32:37 +00:00
Marius Strobl
852f933d9d 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
2011-08-10 19:12:21 +00:00
Nathan Whitehorn
df73c41ac2 Add analogs to the -chrp-boot and -prep-boot options to mkisofs. 2011-05-22 19:56:14 +00:00
Olivier Houchard
01a0f8531a Sync with the latest version from NetBSD. It notably addds ISO9660 support.
Submitted by:	bapt
2010-11-07 16:05:04 +00:00