aboutsummaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/isofs')
-rw-r--r--fs/isofs/dir.c17
-rw-r--r--fs/isofs/inode.c19
-rw-r--r--fs/isofs/isofs.h2
-rw-r--r--fs/isofs/namei.c16
4 files changed, 36 insertions, 18 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;
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;
diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h
index 9ce7b51fb614..38c75151fc66 100644
--- a/fs/isofs/isofs.h
+++ b/fs/isofs/isofs.h
@@ -47,6 +47,8 @@ struct isofs_sb_info {
47 unsigned char s_nosuid; 47 unsigned char s_nosuid;
48 unsigned char s_nodev; 48 unsigned char s_nodev;
49 unsigned char s_nocompress; 49 unsigned char s_nocompress;
50 unsigned char s_hide;
51 unsigned char s_showassoc;
50 52
51 mode_t s_mode; 53 mode_t s_mode;
52 gid_t s_gid; 54 gid_t s_gid;
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c
index 690edf37173c..e37e82b7cbf0 100644
--- a/fs/isofs/namei.c
+++ b/fs/isofs/namei.c
@@ -131,14 +131,16 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
131 } 131 }
132 132
133 /* 133 /*
134 * Skip hidden or associated files unless unhide is set 134 * Skip hidden or associated files unless hide or showassoc,
135 * respectively, is set
135 */ 136 */
136 match = 0; 137 match = 0;
137 if (dlen > 0 && 138 if (dlen > 0 &&
138 (!(de->flags[-sbi->s_high_sierra] & 5) 139 (sbi->s_hide =='n' ||
139 || sbi->s_unhide == 'y')) 140 (!(de->flags[-sbi->s_high_sierra] & 1))) &&
140 { 141 (sbi->s_showassoc =='y' ||
141 match = (isofs_cmp(dentry,dpnt,dlen) == 0); 142 (!(de->flags[-sbi->s_high_sierra] & 4)))) {
143 match = (isofs_cmp(dentry, dpnt, dlen) == 0);
142 } 144 }
143 if (match) { 145 if (match) {
144 isofs_normalize_block_and_offset(de, 146 isofs_normalize_block_and_offset(de,
@@ -146,11 +148,11 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
146 &offset_saved); 148 &offset_saved);
147 *block_rv = block_saved; 149 *block_rv = block_saved;
148 *offset_rv = offset_saved; 150 *offset_rv = offset_saved;
149 if (bh) brelse(bh); 151 brelse(bh);
150 return 1; 152 return 1;
151 } 153 }
152 } 154 }
153 if (bh) brelse(bh); 155 brelse(bh);
154 return 0; 156 return 0;
155} 157}
156 158