Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs/cd9660 We previously attempted to emit Rock ...
details: https://anonhg.NetBSD.org/src/rev/2c3662374428
branches: trunk
changeset: 374328:2c3662374428
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 18 23:02:51 2023 +0000
description:
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:
usr.sbin/makefs/cd9660/iso9660_rrip.c | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
diffs (46 lines):
diff -r 75317cd80c41 -r 2c3662374428 usr.sbin/makefs/cd9660/iso9660_rrip.c
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Apr 18 23:00:02 2023 +0000
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Apr 18 23:02:51 2023 +0000
@@ -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
} 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. */
Home |
Main Index |
Thread Index |
Old Index