aboutsummaryrefslogtreecommitdiffstats
path: root/fs/isofs/inode.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-06-17 19:26:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:45 -0400
commit5404ac8e4418ab3d254950ee4f9bcafc1da20b4a (patch)
tree00ce9ff14b27eb4e8cc1a51970b7da244b102ab7 /fs/isofs/inode.c
parent5c4a656b7e51503c2b5e7e7310ec326ee38a8389 (diff)
isofs: cleanup mount option processing
Remove unused variables from isofs_sb_info (used to be some mount options), unify variables for option to use 0/1 (some options used 'y'/'n'), use bit fields for option flags in superblock. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/isofs/inode.c')
-rw-r--r--fs/isofs/inode.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 0f4f9ca77f8e..58a7963e168a 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -141,24 +141,24 @@ static const struct dentry_operations isofs_dentry_ops[] = {
141}; 141};
142 142
143struct iso9660_options{ 143struct iso9660_options{
144 char map; 144 unsigned int rock:1;
145 char rock; 145 unsigned int cruft:1;
146 unsigned int hide:1;
147 unsigned int showassoc:1;
148 unsigned int nocompress:1;
149 unsigned int overriderockperm:1;
150 unsigned int uid_set:1;
151 unsigned int gid_set:1;
152 unsigned int utf8:1;
153 unsigned char map;
146 char joliet; 154 char joliet;
147 char cruft;
148 char hide;
149 char showassoc;
150 char nocompress;
151 char overriderockperm;
152 unsigned char check; 155 unsigned char check;
153 unsigned int blocksize; 156 unsigned int blocksize;
154 mode_t fmode; 157 mode_t fmode;
155 mode_t dmode; 158 mode_t dmode;
156 char uid_set;
157 char gid_set;
158 gid_t gid; 159 gid_t gid;
159 uid_t uid; 160 uid_t uid;
160 char *iocharset; 161 char *iocharset;
161 unsigned char utf8;
162 /* LVE */ 162 /* LVE */
163 s32 session; 163 s32 session;
164 s32 sbsector; 164 s32 sbsector;
@@ -363,11 +363,11 @@ static int parse_options(char *options, struct iso9660_options *popt)
363 int option; 363 int option;
364 364
365 popt->map = 'n'; 365 popt->map = 'n';
366 popt->rock = 'y'; 366 popt->rock = 1;
367 popt->joliet = 'y'; 367 popt->joliet = 1;
368 popt->cruft = 'n'; 368 popt->cruft = 0;
369 popt->hide = 'n'; 369 popt->hide = 0;
370 popt->showassoc = 'n'; 370 popt->showassoc = 0;
371 popt->check = 'u'; /* unset */ 371 popt->check = 'u'; /* unset */
372 popt->nocompress = 0; 372 popt->nocompress = 0;
373 popt->blocksize = 1024; 373 popt->blocksize = 1024;
@@ -395,20 +395,20 @@ static int parse_options(char *options, struct iso9660_options *popt)
395 token = match_token(p, tokens, args); 395 token = match_token(p, tokens, args);
396 switch (token) { 396 switch (token) {
397 case Opt_norock: 397 case Opt_norock:
398 popt->rock = 'n'; 398 popt->rock = 0;
399 break; 399 break;
400 case Opt_nojoliet: 400 case Opt_nojoliet:
401 popt->joliet = 'n'; 401 popt->joliet = 0;
402 break; 402 break;
403 case Opt_hide: 403 case Opt_hide:
404 popt->hide = 'y'; 404 popt->hide = 1;
405 break; 405 break;
406 case Opt_unhide: 406 case Opt_unhide:
407 case Opt_showassoc: 407 case Opt_showassoc:
408 popt->showassoc = 'y'; 408 popt->showassoc = 1;
409 break; 409 break;
410 case Opt_cruft: 410 case Opt_cruft:
411 popt->cruft = 'y'; 411 popt->cruft = 1;
412 break; 412 break;
413 case Opt_utf8: 413 case Opt_utf8:
414 popt->utf8 = 1; 414 popt->utf8 = 1;
@@ -657,7 +657,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
657 goto out_freebh; 657 goto out_freebh;
658 658
659 sbi->s_high_sierra = 1; 659 sbi->s_high_sierra = 1;
660 opt.rock = 'n'; 660 opt.rock = 0;
661 h_pri = (struct hs_primary_descriptor *)vdp; 661 h_pri = (struct hs_primary_descriptor *)vdp;
662 goto root_found; 662 goto root_found;
663 } 663 }
@@ -680,7 +680,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
680 680
681root_found: 681root_found:
682 682
683 if (joliet_level && (pri == NULL || opt.rock == 'n')) { 683 if (joliet_level && (pri == NULL || !opt.rock)) {
684 /* This is the case of Joliet with the norock mount flag. 684 /* This is the case of Joliet with the norock mount flag.
685 * A disc with both Joliet and Rock Ridge is handled later 685 * A disc with both Joliet and Rock Ridge is handled later
686 */ 686 */
@@ -809,7 +809,7 @@ root_found:
809 s->s_op = &isofs_sops; 809 s->s_op = &isofs_sops;
810 s->s_export_op = &isofs_export_ops; 810 s->s_export_op = &isofs_export_ops;
811 sbi->s_mapping = opt.map; 811 sbi->s_mapping = opt.map;
812 sbi->s_rock = (opt.rock == 'y' ? 2 : 0); 812 sbi->s_rock = (opt.rock ? 2 : 0);
813 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/ 813 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
814 sbi->s_cruft = opt.cruft; 814 sbi->s_cruft = opt.cruft;
815 sbi->s_hide = opt.hide; 815 sbi->s_hide = opt.hide;
@@ -1315,7 +1315,7 @@ static int isofs_read_inode(struct inode *inode)
1315 * this CDROM was mounted with the cruft option. 1315 * this CDROM was mounted with the cruft option.
1316 */ 1316 */
1317 1317
1318 if (sbi->s_cruft == 'y') 1318 if (sbi->s_cruft)
1319 inode->i_size &= 0x00ffffff; 1319 inode->i_size &= 0x00ffffff;
1320 1320
1321 if (de->interleave[0]) { 1321 if (de->interleave[0]) {