aboutsummaryrefslogtreecommitdiffstats
path: root/fs/isofs/inode.c
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2005-06-21 20:16:53 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 22:07:38 -0400
commit9769f4eb3fad2dd53a5d24c81ee5f7f05450742b (patch)
treef8847263d1f91e16a819a97314b497a7ca561f9c /fs/isofs/inode.c
parentf2966632a134e865db3c819346a1dc7d96e05309 (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/inode.c')
-rw-r--r--fs/isofs/inode.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 72cc9727dc07..1652de1b6cb9 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -144,7 +144,8 @@ struct iso9660_options{
144 char rock; 144 char rock;
145 char joliet; 145 char joliet;
146 char cruft; 146 char cruft;
147 char unhide; 147 char hide;
148 char showassoc;
148 char nocompress; 149 char nocompress;
149 unsigned char check; 150 unsigned char check;
150 unsigned int blocksize; 151 unsigned int blocksize;
@@ -309,13 +310,15 @@ enum {
309 Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore, 310 Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore,
310 Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet, 311 Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet,
311 Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err, 312 Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err,
312 Opt_nocompress, 313 Opt_nocompress, Opt_hide, Opt_showassoc,
313}; 314};
314 315
315static match_table_t tokens = { 316static match_table_t tokens = {
316 {Opt_norock, "norock"}, 317 {Opt_norock, "norock"},
317 {Opt_nojoliet, "nojoliet"}, 318 {Opt_nojoliet, "nojoliet"},
318 {Opt_unhide, "unhide"}, 319 {Opt_unhide, "unhide"},
320 {Opt_hide, "hide"},
321 {Opt_showassoc, "showassoc"},
319 {Opt_cruft, "cruft"}, 322 {Opt_cruft, "cruft"},
320 {Opt_utf8, "utf8"}, 323 {Opt_utf8, "utf8"},
321 {Opt_iocharset, "iocharset=%s"}, 324 {Opt_iocharset, "iocharset=%s"},
@@ -356,7 +359,8 @@ static int parse_options(char *options, struct iso9660_options *popt)
356 popt->rock = 'y'; 359 popt->rock = 'y';
357 popt->joliet = 'y'; 360 popt->joliet = 'y';
358 popt->cruft = 'n'; 361 popt->cruft = 'n';
359 popt->unhide = 'n'; 362 popt->hide = 'n';
363 popt->showassoc = 'n';
360 popt->check = 'u'; /* unset */ 364 popt->check = 'u'; /* unset */
361 popt->nocompress = 0; 365 popt->nocompress = 0;
362 popt->blocksize = 1024; 366 popt->blocksize = 1024;
@@ -389,8 +393,12 @@ static int parse_options(char *options, struct iso9660_options *popt)
389 case Opt_nojoliet: 393 case Opt_nojoliet:
390 popt->joliet = 'n'; 394 popt->joliet = 'n';
391 break; 395 break;
396 case Opt_hide:
397 popt->hide = 'y';
398 break;
392 case Opt_unhide: 399 case Opt_unhide:
393 popt->unhide = 'y'; 400 case Opt_showassoc:
401 popt->showassoc = 'y';
394 break; 402 break;
395 case Opt_cruft: 403 case Opt_cruft:
396 popt->cruft = 'y'; 404 popt->cruft = 'y';
@@ -784,7 +792,8 @@ root_found:
784 sbi->s_rock = (opt.rock == 'y' ? 2 : 0); 792 sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
785 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/ 793 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
786 sbi->s_cruft = opt.cruft; 794 sbi->s_cruft = opt.cruft;
787 sbi->s_unhide = opt.unhide; 795 sbi->s_hide = opt.hide;
796 sbi->s_showassoc = opt.showassoc;
788 sbi->s_uid = opt.uid; 797 sbi->s_uid = opt.uid;
789 sbi->s_gid = opt.gid; 798 sbi->s_gid = opt.gid;
790 sbi->s_utf8 = opt.utf8; 799 sbi->s_utf8 = opt.utf8;