diff options
author | Jeremy White <jwhite@codeweavers.com> | 2005-06-21 20:16:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:38 -0400 |
commit | 9769f4eb3fad2dd53a5d24c81ee5f7f05450742b (patch) | |
tree | f8847263d1f91e16a819a97314b497a7ca561f9c /fs/isofs/dir.c | |
parent | f2966632a134e865db3c819346a1dc7d96e05309 (diff) |
[PATCH] isofs: show hidden files, add granularity for assoc/hidden files flags
The current isofs treatment of hidden files is flawed in two ways. First,
it does not provide sufficient granularity; it hides both 'hidden' files
and 'associated' files (resource fork for Mac files). Second, the default
behavior to completely strip hidden files, while an admirable
implementation of the spec, is a poor choice given the real world use of
hidden files as a poor mans copy protection scheme for MSDOS and Windows
based systems. A longer description of this is available here:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0205.3/0267.html
This patch was originally built after a few private conversations with Alan
Cox; I shamefully failed to persist in seeing it go forward, I hope to make
amends now.
This patch introduces granularity by allowing explicit control for both
hidden and associated files. It also reverses the default so that by
default, hidden files are treated as regular files on the iso9660 file
system.
This allow Wine to process Windows CDs, including those that are hybrid
Mac/Windows CDs properly and completely, without our having to go muck up
peoples fstabs as we do now. (I have tested this with such a hybrid +
hidden CD and have verified that this patch works as claimed).
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/isofs/dir.c')
-rw-r--r-- | fs/isofs/dir.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index 6030956b894b..7901ac9f97ab 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c | |||
@@ -193,12 +193,17 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp, | |||
193 | 193 | ||
194 | /* Handle everything else. Do name translation if there | 194 | /* Handle everything else. Do name translation if there |
195 | is no Rock Ridge NM field. */ | 195 | is no Rock Ridge NM field. */ |
196 | if (sbi->s_unhide == 'n') { | 196 | |
197 | /* Do not report hidden or associated files */ | 197 | /* |
198 | if (de->flags[-sbi->s_high_sierra] & 5) { | 198 | * Do not report hidden files if so instructed, or associated |
199 | filp->f_pos += de_len; | 199 | * files unless instructed to do so |
200 | continue; | 200 | */ |
201 | } | 201 | if ((sbi->s_hide == 'y' && |
202 | (de->flags[-sbi->s_high_sierra] & 1)) || | ||
203 | (sbi->s_showassoc =='n' && | ||
204 | (de->flags[-sbi->s_high_sierra] & 4))) { | ||
205 | filp->f_pos += de_len; | ||
206 | continue; | ||
202 | } | 207 | } |
203 | 208 | ||
204 | map = 1; | 209 | map = 1; |