diff options
author | Ed Maste <emaste@FreeBSD.org> | 2023-03-24 17:53:59 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2023-03-25 13:25:18 +0000 |
commit | 978013a0945d4c6b7ab3ee798dc13c74e913762a (patch) | |
tree | 059cf44840310b3a76a01dc6a09c8afff28b05ba | |
parent | 1f0c8bfd650422a30aa6fcf01da860b8d43628a8 (diff) | |
download | src-978013a0945d4c6b7ab3ee798dc13c74e913762a.tar.gz src-978013a0945d4c6b7ab3ee798dc13c74e913762a.zip |
makefs: emit NM records for all directory entries
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.
PR: 203531
Reported by: Thomas Schmitt <scdbackup@gmx.net
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39258
-rw-r--r-- | usr.sbin/makefs/cd9660/iso9660_rrip.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c index afe46c58747d..1107688aa21e 100644 --- a/usr.sbin/makefs/cd9660/iso9660_rrip.c +++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c @@ -414,26 +414,12 @@ cd9660_rrip_initialize_node(iso9660_disk *diskStructure, cd9660node *node, } else { cd9660_rrip_initialize_inode(node); - /* - * Not every node needs a NM set - only if the name is - * actually different. IE: If a file is TEST -> TEST, - * no NM. test -> TEST, need a NM - * - * The rr_moved_dir needs to be assigned a NM record as well. - */ if (node == diskStructure->rr_moved_dir) { cd9660_rrip_add_NM(node, RRIP_DEFAULT_MOVE_DIR_NAME); - } - else if ((node->node != NULL) && - ((strlen(node->node->name) != - (uint8_t)node->isoDirRecord->name_len[0]) || - (memcmp(node->node->name,node->isoDirRecord->name, - (uint8_t)node->isoDirRecord->name_len[0]) != 0))) { + } else if (node->node != NULL) { cd9660_rrip_NM(node); } - - /* Rock ridge directory relocation code here. */ /* First handle the CL for the placeholder file. */ |