Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src pullup from trunk (approved by thorpej):
details: https://anonhg.NetBSD.org/src/rev/4f61d0eb89e6
branches: netbsd-1-5
changeset: 488541:4f61d0eb89e6
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Jul 16 07:52:06 2000 +0000
description:
pullup from trunk (approved by thorpej):
Add an option to do case-insensitive lookups even on Rock-Ridge CD-ROMS.
Add 'rrcaseins' option to mount_cd9660(8).
This addresses kern/2419 by Jason Downs.
diffstat:
sbin/mount_cd9660/mount_cd9660.8 | 7 +++++--
sbin/mount_cd9660/mount_cd9660.c | 5 +++--
sys/isofs/cd9660/cd9660_lookup.c | 15 +++++++++++----
sys/isofs/cd9660/cd9660_mount.h | 3 ++-
sys/isofs/cd9660/cd9660_vfsops.c | 4 ++--
5 files changed, 23 insertions(+), 11 deletions(-)
diffs (119 lines):
diff -r b64c8fd51573 -r 4f61d0eb89e6 sbin/mount_cd9660/mount_cd9660.8
--- a/sbin/mount_cd9660/mount_cd9660.8 Sun Jul 16 07:39:02 2000 +0000
+++ b/sbin/mount_cd9660/mount_cd9660.8 Sun Jul 16 07:52:06 2000 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: mount_cd9660.8,v 1.10.2.1 2000/07/15 14:02:42 jdolecek Exp $
+.\" $NetBSD: mount_cd9660.8,v 1.10.2.2 2000/07/16 07:52:06 jdolecek Exp $
.\"
.\" Copyright (c) 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -101,11 +101,14 @@
Same as
.Cm norrip .
For compatibility with Solaris only.
+.It Cm rrcaseins
+Makes all lookups case-insensitive even for CD-ROMs with Rock-Ridge
+extensions (for Rock-Ridge, default is case-sensitive lookup).
.El
.El
For compatibility with previous releases, following obsolete flags are
-recognized:
+still recognized:
.Bl -tag -width indent
.It Fl e
Same as
diff -r b64c8fd51573 -r 4f61d0eb89e6 sbin/mount_cd9660/mount_cd9660.c
--- a/sbin/mount_cd9660/mount_cd9660.c Sun Jul 16 07:39:02 2000 +0000
+++ b/sbin/mount_cd9660/mount_cd9660.c Sun Jul 16 07:52:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_cd9660.c,v 1.11.2.1 2000/07/15 14:02:42 jdolecek Exp $ */
+/* $NetBSD: mount_cd9660.c,v 1.11.2.2 2000/07/16 07:52:06 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -50,7 +50,7 @@
#if 0
static char sccsid[] = "@(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: mount_cd9660.c,v 1.11.2.1 2000/07/15 14:02:42 jdolecek Exp $");
+__RCSID("$NetBSD: mount_cd9660.c,v 1.11.2.2 2000/07/16 07:52:06 jdolecek Exp $");
#endif
#endif /* not lint */
@@ -76,6 +76,7 @@
{ "nrr", 0, ISOFSMNT_NORRIP, 1 },
{ "rrip", 1, ISOFSMNT_NORRIP, 1 },
{ "joliet", 1, ISOFSMNT_NOJOLIET, 1 },
+ { "rrcaseins", 0, ISOFSMNT_RRCASEINS, 1 },
{ NULL }
};
diff -r b64c8fd51573 -r 4f61d0eb89e6 sys/isofs/cd9660/cd9660_lookup.c
--- a/sys/isofs/cd9660/cd9660_lookup.c Sun Jul 16 07:39:02 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_lookup.c Sun Jul 16 07:52:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_lookup.c,v 1.26 2000/03/30 12:13:30 augustss Exp $ */
+/* $NetBSD: cd9660_lookup.c,v 1.26.4.1 2000/07/16 07:52:07 jdolecek Exp $ */
/*-
* Copyright (c) 1989, 1993, 1994
@@ -55,6 +55,7 @@
#include <isofs/cd9660/cd9660_node.h>
#include <isofs/cd9660/iso_rrip.h>
#include <isofs/cd9660/cd9660_rrip.h>
+#include <isofs/cd9660/cd9660_mount.h>
struct nchstats iso_nchstats;
@@ -291,9 +292,15 @@
ino = dbtob(bp->b_blkno) + entryoffsetinblock;
dp->i_ino = ino;
cd9660_rrip_getname(ep,altname,&namelen,&dp->i_ino,imp);
- if (namelen == cnp->cn_namelen
- && !memcmp(name, altname, namelen))
- goto found;
+ if (namelen == cnp->cn_namelen) {
+ if (imp->im_flags & ISOFSMNT_RRCASEINS) {
+ if (strncasecmp(name, altname, namelen) == 0)
+ goto found;
+ } else {
+ if (memcmp(name, altname, namelen) == 0)
+ goto found;
+ }
+ }
ino = 0;
break;
}
diff -r b64c8fd51573 -r 4f61d0eb89e6 sys/isofs/cd9660/cd9660_mount.h
--- a/sys/isofs/cd9660/cd9660_mount.h Sun Jul 16 07:39:02 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_mount.h Sun Jul 16 07:52:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_mount.h,v 1.4 2000/05/27 16:03:55 jdolecek Exp $ */
+/* $NetBSD: cd9660_mount.h,v 1.4.2.1 2000/07/16 07:52:07 jdolecek Exp $ */
/*
* Copyright (c) 1995
* The Regents of the University of California. All rights reserved.
@@ -52,3 +52,4 @@
#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
#define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet extensions */
#define ISOFSMNT_NOCASETRANS 0x00000010 /* do not make names lower case */
+#define ISOFSMNT_RRCASEINS 0x00000020 /* case insensitive Rock Ridge */
diff -r b64c8fd51573 -r 4f61d0eb89e6 sys/isofs/cd9660/cd9660_vfsops.c
--- a/sys/isofs/cd9660/cd9660_vfsops.c Sun Jul 16 07:39:02 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_vfsops.c Sun Jul 16 07:52:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.48 2000/05/27 16:03:56 jdolecek Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.48.2.1 2000/07/16 07:52:07 jdolecek Exp $ */
/*-
* Copyright (c) 1994
@@ -433,7 +433,7 @@
bp = NULL;
}
isomp->im_flags = argp->flags & (ISOFSMNT_NORRIP | ISOFSMNT_GENS |
- ISOFSMNT_EXTATT | ISOFSMNT_NOJOLIET);
+ ISOFSMNT_EXTATT | ISOFSMNT_NOJOLIET | ISOFSMNT_RRCASEINS);
if (isomp->im_flags & ISOFSMNT_GENS)
isomp->iso_ftype = ISO_FTYPE_9660;
Home |
Main Index |
Thread Index |
Old Index