| #
1f31d437
|
| 30-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Fix cd9660 duplicate directory names
Previously we could create cd9660 images with duplicate short (level 2) names.
cd9660_level2_convert_filename used a 30-character limit (for files and d
makefs: Fix cd9660 duplicate directory names
Previously we could create cd9660 images with duplicate short (level 2) names.
cd9660_level2_convert_filename used a 30-character limit (for files and directories), not including the '.' separator. cd9660_rename_filename used a 31-character limit, including the '.'. Directory names 31 characters or longer (without '.') were shortened to 30 characters, and if a collision occurred cd9660_rename_filename uniquified them starting with the 31st character. Unfortunately the directory record's name_len was already set, so the unique part of the name was stripped off.
Directories are up to 31 d-characters (i.e., A-Z 0-9 and _); there is no provision for a '.' in a directory name. Increase the name length limit to 31 for directories, and exclude '.'s.
This name mapping and deduplication code is still fragile and convoluted and would beenfit from a more holistic effort.
PR: 283238, 283112 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48251
show more ...
|
| #
788e1eb7
|
| 24-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Remove impossible if condition
This test is inside the else block for `if (*oldname == '.')`, so *oldname cannot be '.' here.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differ
makefs: Remove impossible if condition
This test is inside the else block for `if (*oldname == '.')`, so *oldname cannot be '.' here.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48243
show more ...
|
| #
2e09cef8
|
| 24-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Fix cd9660 filename buffer maximum length
The maximum length is 30 characters for name and extension, two separators (. and ;) and 5 characters for file version from 1 to 32767, which is 37
makefs: Fix cd9660 filename buffer maximum length
The maximum length is 30 characters for name and extension, two separators (. and ;) and 5 characters for file version from 1 to 32767, which is 37 characters. Add one for the null term as we treat these buffers as C strings.
This is not an issue in practice, as the file version is always 1 in makefs.
While here, drop `_WITH_PADDING` from the macro name and update the previously-unused ISO_FILENAME_MAXLENGTH for the corrected length. A 0x00 padding byte is used by ISO9660 when needed for alignment, which can be the null byte at the end of the string.
Use sizeof where appropriate.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48193
show more ...
|
| #
b45f84cc
|
| 23-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Exit with error if writing cd image fails
Obtained from: OpenBSD c8f48d9b1ea9 Sponsored by: The FreeBSD Foundation
|
| #
2069f6ec
|
| 22-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Crudely fix a sprintf warning
Reviewed by: kevans Obtained from: OpenBSD d95291fdb2dc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48178
|
| #
4d65a7c6
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
c0696205
|
| 15-Nov-2023 |
John Baldwin <jhb@FreeBSD.org> |
makefs cd9660: Unexpand a few TAILQ macros
Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42580
|
| #
84696cf1
|
| 30-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: remove ISO9660 Archimedes extension support
We have no need to create ISO images with RISC OS specific metadata.
Reviewed by: imp Relnotes: yes Obtained from: OpenBSD a435da44c07f Sponsored
makefs: remove ISO9660 Archimedes extension support
We have no need to create ISO images with RISC OS specific metadata.
Reviewed by: imp Relnotes: yes Obtained from: OpenBSD a435da44c07f Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39344
show more ...
|
| #
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 BS
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
show more ...
|
| #
10854bf5
|
| 10-Apr-2023 |
Ed Maste <emaste@FreeBSD.org> |
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
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
show more ...
|
| #
c753f49f
|
| 31-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
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
|
| #
1d1ffa2e
|
| 30-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: use size_t or ssize_t where appropriate
Obtained from: NetBSD af7bc97830ac
|
| #
c02e6ca7
|
| 31-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: simplify filename conversion handling
Obtained from: OpenBSD 4095a2e01d18 Sponsored by: The FreeBSD Foundation
|
| #
7bc4ccf3
|
| 06-Apr-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: avoid uninitialized memory in root directory date
Move date setting into cd9660_populate_iso_dir_record so there is no path that leaves it unset.
PR: 203531 Reported by: Thomas Schmitt <sc
makefs: avoid uninitialized memory in root directory date
Move date setting into cd9660_populate_iso_dir_record so there is no path that leaves it unset.
PR: 203531 Reported by: Thomas Schmitt <scdbackup@gmx.net> Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39258
show more ...
|
| #
2f11df63
|
| 31-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.
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
show more ...
|
| #
c6ed8694
|
| 30-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: improve some cd9660 error messages
Obtained from: OpenBSD Sponsored by: The FreeBSD Foundation
|
| #
efe6a157
|
| 30-Mar-2023 |
Ed Maste <emaste@FreeBSD.org> |
makefs: correct "filname" typo
Obtained from: NetBSD cd9660.c r1.58
|
| #
06a400d7
|
| 20-Sep-2022 |
Ed Maste <emaste@FreeBSD.org> |
makefs: whitespace cleanup (remove space before tab)
MFC after: 1 week
|
| #
1f31d437
|
| 30-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Fix cd9660 duplicate directory names
Previously we could create cd9660 images with duplicate short (level 2) names.
cd9660_level2_convert_filename used a 30-character limit (for files and d
makefs: Fix cd9660 duplicate directory names
Previously we could create cd9660 images with duplicate short (level 2) names.
cd9660_level2_convert_filename used a 30-character limit (for files and directories), not including the '.' separator. cd9660_rename_filename used a 31-character limit, including the '.'. Directory names 31 characters or longer (without '.') were shortened to 30 characters, and if a collision occurred cd9660_rename_filename uniquified them starting with the 31st character. Unfortunately the directory record's name_len was already set, so the unique part of the name was stripped off.
Directories are up to 31 d-characters (i.e., A-Z 0-9 and _); there is no provision for a '.' in a directory name. Increase the name length limit to 31 for directories, and exclude '.'s.
This name mapping and deduplication code is still fragile and convoluted and would beenfit from a more holistic effort.
PR: 283238, 283112 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48251
show more ...
|
| #
788e1eb7
|
| 24-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Remove impossible if condition
This test is inside the else block for `if (*oldname == '.')`, so *oldname cannot be '.' here.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differ
makefs: Remove impossible if condition
This test is inside the else block for `if (*oldname == '.')`, so *oldname cannot be '.' here.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48243
show more ...
|
| #
2e09cef8
|
| 24-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Fix cd9660 filename buffer maximum length
The maximum length is 30 characters for name and extension, two separators (. and ;) and 5 characters for file version from 1 to 32767, which is 37
makefs: Fix cd9660 filename buffer maximum length
The maximum length is 30 characters for name and extension, two separators (. and ;) and 5 characters for file version from 1 to 32767, which is 37 characters. Add one for the null term as we treat these buffers as C strings.
This is not an issue in practice, as the file version is always 1 in makefs.
While here, drop `_WITH_PADDING` from the macro name and update the previously-unused ISO_FILENAME_MAXLENGTH for the corrected length. A 0x00 padding byte is used by ISO9660 when needed for alignment, which can be the null byte at the end of the string.
Use sizeof where appropriate.
Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48193
show more ...
|
| #
b45f84cc
|
| 23-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Exit with error if writing cd image fails
Obtained from: OpenBSD c8f48d9b1ea9 Sponsored by: The FreeBSD Foundation
|
| #
2069f6ec
|
| 22-Dec-2024 |
Ed Maste <emaste@FreeBSD.org> |
makefs: Crudely fix a sprintf warning
Reviewed by: kevans Obtained from: OpenBSD d95291fdb2dc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48178
|
| #
4d65a7c6
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|