updated isofs-patch for caps 8.3

*Vic* P. Franck (vic@kcs.de)
Wed, 18 Feb 1998 05:49:48 +0100


This is a multi-part message in MIME format.

--------------14DBC906787543B7623ECC20
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I've updated the patch against 2.1.87.

Can anyone with ATAPI-CD drive please try it out for me?

sr_mod is broken in 2.1.87 and I only have a whole pile of
SCSI CD drives here. Furthermore I don't have a single
joliet CD-ROM for testing.

It should give all uppercase 8.3 filenames, only on plain ISO9660
CD fs, if the CD was mounted with "-o map=dos". On Rockridge and
Joliet it should not have any impact.

BTW: anyone interested in such anyway? Wondering if I'm the only
guy who ran across that CD-Server problem...

Regards,
Peter

--------------14DBC906787543B7623ECC20
Content-Type: text/plain; charset=us-ascii; name="isofs-upper8.3-patch-2.1.87"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="isofs-upper8.3-patch-2.1.87"

diff -u isofs.org/dir.c isofs/dir.c
--- isofs.org/dir.c Fri Dec 19 01:37:02 1997
+++ isofs/dir.c Wed Feb 18 02:36:10 1998
@@ -7,6 +7,8 @@
*
* Steve Beynon : Missing last directory entries fixed
* (stephen@askone.demon.co.uk) : 21st June 1996
+ *
+ * 1998 Peter Franck (vic@ccc.de) - added "map=dos" mount option (8.3 uppercase)
*
* isofs directory handling functions
*/
@@ -63,7 +65,7 @@
NULL /* permission */
};

-static int isofs_name_translate(char * old, int len, char * new)
+static int isofs_name_translate(char * old, int len, char * new, int dos_trn)
{
int i, c;

@@ -71,7 +73,7 @@
c = old[i];
if (!c)
break;
- if (c >= 'A' && c <= 'Z')
+ if (c >= 'A' && c <= 'Z' && !dos_trn)
c |= 0x20; /* lower case */

/* Drop trailing '.;1' (ISO9660:1988 7.5.1 requires period) */
@@ -225,7 +227,7 @@
{
if (inode->i_sb->u.isofs_sb.s_mapping == 'n') {
len = isofs_name_translate(de->name, de->name_len[0],
- tmpname);
+ tmpname, inode->i_sb->u.isofs_sb.s_mapping == 'd');
p = tmpname;
} else {
p = de->name;
diff -u isofs.org/inode.c isofs/inode.c
--- isofs.org/inode.c Tue Feb 10 01:12:56 1998
+++ isofs/inode.c Wed Feb 18 02:39:40 1998
@@ -5,6 +5,8 @@
* 1992, 1993, 1994 Eric Youngdale Modified for ISO9660 filesystem.
* 1994 Eberhard Moenkeberg - multi session handling.
* 1995 Mark Dobie - allow mounting of some weird VideoCDs and PhotoCDs.
+ * 1998 Peter Franck (vic@ccc.de) - added "map=dos" mount option (8.3 uppe
+ rcase)
*
*/

@@ -150,10 +152,11 @@
} else
#endif
if (!strcmp(this_char,"map") && value) {
- if (value[0] && !value[1] && strchr("on",*value))
+ if (value[0] && !value[1] && strchr("ond",*value))
popt->map = *value;
else if (!strcmp(value,"off")) popt->map = 'o';
else if (!strcmp(value,"normal")) popt->map = 'n';
+ else if (!strcmp(value,"dos")) popt->map = 'd';
else return 0;
}
else if (!strcmp(this_char,"check") && value) {
diff -u isofs.org/namei.c isofs/namei.c
--- isofs.org/namei.c Wed Dec 3 13:24:29 1997
+++ isofs/namei.c Wed Feb 18 02:36:24 1998
@@ -4,6 +4,9 @@
* (C) 1992 Eric Youngdale Modified for ISO9660 filesystem.
*
* (C) 1991 Linus Torvalds - minix filesystem
+ *
+ * 1998 Peter Franck (vic@ccc.de) - added "map=dos" mount option (8.3 upp
+ercase)
*/

#include <linux/sched.h>
@@ -64,7 +67,7 @@
{
unsigned long bufsize = ISOFS_BUFFER_SIZE(dir);
unsigned char bufbits = ISOFS_BUFFER_BITS(dir);
- unsigned int block, i, f_pos, offset,
+ unsigned int block, i, f_pos, offset, dos_case,
inode_number = 0; /* shut gcc up */
struct buffer_head * bh , * retval = NULL;
unsigned int old_offset;
@@ -178,11 +181,12 @@
dlen = get_joliet_filename(de, dir, page);
dpnt = page;
#endif
- } else if (dir->i_sb->u.isofs_sb.s_mapping == 'n') {
+ } else if (dir->i_sb->u.isofs_sb.s_mapping != 'o') {
+ dos_case = (dir->i_sb->u.isofs_sb.s_mapping == 'd');
for (i = 0; i < dlen; i++) {
c = dpnt[i];
- /* lower case */
- if (c >= 'A' && c <= 'Z') c |= 0x20;
+ /* lower case only if no dos mapping*/
+ if (c >= 'A' && c <= 'Z' && !dos_case) c |= 0x20;
if (c == ';' && i == dlen-2 && dpnt[i+1] == '1') {
dlen -= 2;
break;

--------------14DBC906787543B7623ECC20--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu