2002-06-19 02:38:15

by Jeremy White

[permalink] [raw]
Subject: Re: isofs unhide option: troubles with Wine

diff -ur orig/Documentation/filesystems/isofs.txt linux-2.5.20/Documentation/filesystems/isofs.txt
--- orig/Documentation/filesystems/isofs.txt Sun Jun 2 20:44:42 2002
+++ linux-2.5.20/Documentation/filesystems/isofs.txt Mon Jun 17 20:58:06 2002
@@ -26,6 +26,7 @@
mode=xxx Sets the permissions on files to xxx
nojoliet Ignore Joliet extensions if they are present.
norock Ignore Rock Ridge extensions if they are present.
- unhide Show hidden files.
+ hide Completely strip hidden files from the file system.
+ showassoc Show files marked with the 'associated' bit
session=x Select number of session on multisession CD
sbsector=xxx Session begins from sector xxx
diff -ur orig/fs/isofs/dir.c linux-2.5.20/fs/isofs/dir.c
--- orig/fs/isofs/dir.c Sun Jun 2 20:44:45 2002
+++ linux-2.5.20/fs/isofs/dir.c Mon Jun 17 21:35:53 2002
@@ -194,12 +194,12 @@

/* Handle everything else. Do name translation if there
is no Rock Ridge NM field. */
- if (sbi->s_unhide == 'n') {
- /* Do not report hidden or associated files */
- if (de->flags[-sbi->s_high_sierra] & 5) {
- filp->f_pos += de_len;
- continue;
- }
+
+ /* Do not report hidden files if so instructed, or associated files unless instructed to do so */
+ if ( ( sbi->s_hide =='y' && (de->flags[-sbi->s_high_sierra] & 1) ) ||
+ ( sbi->s_showassoc =='n' && (de->flags[-sbi->s_high_sierra] & 4) ) ) {
+ filp->f_pos += de_len;
+ continue;
}

map = 1;
diff -ur orig/fs/isofs/inode.c linux-2.5.20/fs/isofs/inode.c
--- orig/fs/isofs/inode.c Sun Jun 2 20:44:53 2002
+++ linux-2.5.20/fs/isofs/inode.c Tue Jun 18 21:14:08 2002
@@ -172,7 +172,8 @@
char rock;
char joliet;
char cruft;
- char unhide;
+ char hide;
+ char showassoc;
char nocompress;
unsigned char check;
unsigned int blocksize;
@@ -341,7 +342,8 @@
popt->rock = 'y';
popt->joliet = 'y';
popt->cruft = 'n';
- popt->unhide = 'n';
+ popt->hide = 'n';
+ popt->showassoc = 'n';
popt->check = 'u'; /* unset */
popt->nocompress = 0;
popt->blocksize = 1024;
@@ -367,8 +369,12 @@
popt->joliet = 'n';
continue;
}
- if (strncmp(this_char,"unhide",6) == 0) {
- popt->unhide = 'y';
+ if (strncmp(this_char,"hide",4) == 0) {
+ popt->hide = 'y';
+ continue;
+ }
+ if (strncmp(this_char,"showassoc",9) == 0) {
+ popt->showassoc= 'y';
continue;
}
if (strncmp(this_char,"cruft",5) == 0) {
@@ -562,7 +568,8 @@
printk("joliet = %c\n", opt.joliet);
printk("check = %c\n", opt.check);
printk("cruft = %c\n", opt.cruft);
- printk("unhide = %c\n", opt.unhide);
+ printk("hide = %c\n", opt.hide);
+ printk("showassoc= %c\n", opt.showassoc);
printk("blocksize = %d\n", opt.blocksize);
printk("gid = %d\n", opt.gid);
printk("uid = %d\n", opt.uid);
@@ -806,7 +813,8 @@
sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
sbi->s_cruft = opt.cruft;
- sbi->s_unhide = opt.unhide;
+ sbi->s_hide = opt.hide;
+ sbi->s_showassoc = opt.showassoc;
sbi->s_uid = opt.uid;
sbi->s_gid = opt.gid;
sbi->s_utf8 = opt.utf8;
diff -ur orig/fs/isofs/namei.c linux-2.5.20/fs/isofs/namei.c
--- orig/fs/isofs/namei.c Sun Jun 2 20:44:52 2002
+++ linux-2.5.20/fs/isofs/namei.c Mon Jun 17 21:16:08 2002
@@ -140,12 +140,12 @@
}

/*
- * Skip hidden or associated files unless unhide is set
+ * Skip hidden or associated files unless hide or showassoc, respectively, is set
*/
match = 0;
if (dlen > 0 &&
- (!(de->flags[-sbi->s_high_sierra] & 5)
- || sbi->s_unhide == 'y'))
+ ( sbi->s_hide =='n' || (!(de->flags[-sbi->s_high_sierra] & 1)) ) &&
+ ( sbi->s_showassoc =='y' || (!(de->flags[-sbi->s_high_sierra] & 4)) ) )
{
match = (isofs_cmp(dentry,dpnt,dlen) == 0);
}
diff -ur orig/include/linux/iso_fs_sb.h linux-2.5.20/include/linux/iso_fs_sb.h
--- orig/include/linux/iso_fs_sb.h Sun Jun 2 20:44:50 2002
+++ linux-2.5.20/include/linux/iso_fs_sb.h Mon Jun 17 20:57:47 2002
@@ -20,7 +20,8 @@
unsigned char s_cruft; /* Broken disks with high
byte of length containing
junk */
- unsigned char s_unhide;
+ unsigned char s_hide;
+ unsigned char s_showassoc;
unsigned char s_nosuid;
unsigned char s_nodev;
unsigned char s_nocompress;


Attachments:
bugfix.patch (211.00 B)
reversehide.patch (4.33 kB)
Download all attachments