summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2023-04-18 23:02:51 +0000
committerchristos <christos@NetBSD.org>2023-04-18 23:02:51 +0000
commitf9741bf1178a53a0fb54e9b2e0545440d0ba6213 (patch)
tree1ace81d792052fd32a6bae96d57a9ab90cddb5da /usr.sbin
parentb3708fc1fa05fb63f026a5ecc5aa7bb6b59709dd (diff)
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. From FreeBSD https://reviews.freebsd.org/D39258
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
index e65bc3480f8..a68b94f78ef 100644
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c
@@ -1,4 +1,4 @@
-/* $NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos Exp $ */
+/* $NetBSD: iso9660_rrip.c,v 1.16 2023/04/18 23:02:51 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -44,7 +44,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: iso9660_rrip.c,v 1.15 2023/04/18 22:56:41 christos Exp $");
+__RCSID("$NetBSD: iso9660_rrip.c,v 1.16 2023/04/18 23:02:51 christos Exp $");
#endif /* !__lint */
static void cd9660_rrip_initialize_inode(cd9660node *);
@@ -413,26 +413,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. */