Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/isofs/cd9660 add a new mount flag ISOFSMNT_NOCASETRANS -...
details: https://anonhg.NetBSD.org/src/rev/56ba91ab85d5
branches: trunk
changeset: 486697:56ba91ab85d5
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat May 27 16:03:55 2000 +0000
description:
add a new mount flag ISOFSMNT_NOCASETRANS - if set, the file names are not
translated to lower case
diffstat:
sys/isofs/cd9660/cd9660_extern.h | 4 ++--
sys/isofs/cd9660/cd9660_mount.h | 13 +++++++------
sys/isofs/cd9660/cd9660_rrip.c | 4 ++--
sys/isofs/cd9660/cd9660_util.c | 7 ++++---
sys/isofs/cd9660/cd9660_vfsops.c | 22 ++++++++++------------
sys/isofs/cd9660/cd9660_vnops.c | 4 +++-
6 files changed, 28 insertions(+), 26 deletions(-)
diffs (154 lines):
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_extern.h
--- a/sys/isofs/cd9660/cd9660_extern.h Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_extern.h Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_extern.h,v 1.8 2000/03/16 18:08:23 jdolecek Exp $ */
+/* $NetBSD: cd9660_extern.h,v 1.9 2000/05/27 16:03:55 jdolecek Exp $ */
/*-
* Copyright (c) 1994
@@ -110,5 +110,5 @@
int isochar __P((const u_char *, const u_char *, int, u_char *));
int isofncmp __P((const u_char *, int, const u_char *, int, int));
-void isofntrans __P((u_char *, int, u_char *, u_short *, int, int, int));
+void isofntrans __P((u_char *, int, u_char *, u_short *, int, int, int, int));
ino_t isodirino __P((struct iso_directory_record *, struct iso_mnt *));
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_mount.h
--- a/sys/isofs/cd9660/cd9660_mount.h Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_mount.h Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_mount.h,v 1.3 1999/07/13 11:12:05 scw Exp $ */
+/* $NetBSD: cd9660_mount.h,v 1.4 2000/05/27 16:03:55 jdolecek Exp $ */
/*
* Copyright (c) 1995
* The Regents of the University of California. All rights reserved.
@@ -43,11 +43,12 @@
* Arguments to mount ISO 9660 filesystems.
*/
struct iso_args {
- char *fspec; /* block special device to mount */
+ const char *fspec; /* block special device to mount */
struct export_args export; /* network export info */
int flags; /* mounting flags, see below */
};
-#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
-#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
-#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
-#define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet extensions */
+#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
+#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
+#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
+#define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet extensions */
+#define ISOFSMNT_NOCASETRANS 0x00000010 /* do not make names lower case */
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_rrip.c
--- a/sys/isofs/cd9660/cd9660_rrip.c Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_rrip.c Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_rrip.c,v 1.20 2000/03/30 12:13:31 augustss Exp $ */
+/* $NetBSD: cd9660_rrip.c,v 1.21 2000/05/27 16:03:56 jdolecek Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -300,7 +300,7 @@
isofntrans(isodir->name, isonum_711(isodir->name_len),
ana->outbuf, ana->outlen,
- 1, isonum_711(isodir->flags) & 4,
+ 1, 0, isonum_711(isodir->flags) & 4,
ana->imp->im_joliet_level);
switch (ana->outbuf[0]) {
default:
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_util.c
--- a/sys/isofs/cd9660/cd9660_util.c Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_util.c Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_util.c,v 1.14 2000/03/29 03:43:32 simonb Exp $ */
+/* $NetBSD: cd9660_util.c,v 1.15 2000/05/27 16:03:56 jdolecek Exp $ */
/*-
* Copyright (c) 1994
@@ -157,11 +157,12 @@
* translate a filename
*/
void
-isofntrans(infn, infnlen, outfn, outfnlen, original, assoc, joliet_level)
+isofntrans(infn, infnlen, outfn, outfnlen, original, casetrans, assoc, joliet_level)
u_char *infn, *outfn;
int infnlen;
u_short *outfnlen;
int original;
+ int casetrans;
int assoc;
int joliet_level;
{
@@ -177,7 +178,7 @@
infn += isochar(infn, infnend, joliet_level, &c);
- if (!original && joliet_level == 0 && c >= 'A' && c <= 'Z')
+ if (casetrans && joliet_level == 0 && c >= 'A' && c <= 'Z')
*outfn++ = c + ('a' - 'A');
else if (!original && c == ';') {
if (fnidx > 0 && outfn[-1] == '.')
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_vfsops.c
--- a/sys/isofs/cd9660/cd9660_vfsops.c Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_vfsops.c Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.47 2000/05/10 20:35:35 scw Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.48 2000/05/27 16:03:56 jdolecek Exp $ */
/*-
* Copyright (c) 1994
@@ -434,17 +434,15 @@
}
isomp->im_flags = argp->flags & (ISOFSMNT_NORRIP | ISOFSMNT_GENS |
ISOFSMNT_EXTATT | ISOFSMNT_NOJOLIET);
- switch (isomp->im_flags&(ISOFSMNT_NORRIP|ISOFSMNT_GENS)) {
- default:
- isomp->iso_ftype = ISO_FTYPE_DEFAULT;
- break;
- case ISOFSMNT_GENS|ISOFSMNT_NORRIP:
- isomp->iso_ftype = ISO_FTYPE_9660;
- break;
- case 0:
- isomp->iso_ftype = ISO_FTYPE_RRIP;
- break;
- }
+
+ if (isomp->im_flags & ISOFSMNT_GENS)
+ isomp->iso_ftype = ISO_FTYPE_9660;
+ else if (isomp->im_flags & ISOFSMNT_NORRIP) {
+ isomp->iso_ftype = ISO_FTYPE_DEFAULT;
+ if (argp->flags & ISOFSMNT_NOCASETRANS)
+ isomp->im_flags |= ISOFSMNT_NOCASETRANS;
+ } else
+ isomp->iso_ftype = ISO_FTYPE_RRIP;
/* Check the Joliet Extension support */
if ((argp->flags & ISOFSMNT_NORRIP) != 0 &&
diff -r 4fe7b27ed7b8 -r 56ba91ab85d5 sys/isofs/cd9660/cd9660_vnops.c
--- a/sys/isofs/cd9660/cd9660_vnops.c Sat May 27 15:30:12 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_vnops.c Sat May 27 16:03:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vnops.c,v 1.57 2000/03/30 12:13:31 augustss Exp $ */
+/* $NetBSD: cd9660_vnops.c,v 1.58 2000/05/27 16:03:56 jdolecek Exp $ */
/*-
* Copyright (c) 1994
@@ -62,6 +62,7 @@
#include <isofs/cd9660/cd9660_extern.h>
#include <isofs/cd9660/cd9660_node.h>
#include <isofs/cd9660/iso_rrip.h>
+#include <isofs/cd9660/cd9660_mount.h>
/*
* Structure for reading directories
@@ -552,6 +553,7 @@
isofntrans(ep->name,idp->current.d_namlen,
idp->current.d_name, &namelen,
imp->iso_ftype == ISO_FTYPE_9660,
+ (imp->im_flags & ISOFSMNT_NOCASETRANS) == 0,
isonum_711(ep->flags)&4,
imp->im_joliet_level);
switch (idp->current.d_name[0]) {
Home |
Main Index |
Thread Index |
Old Index