aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hpfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs/super.c')
-rw-r--r--fs/hpfs/super.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 6493377cbef5..4858ff882d09 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -219,7 +219,6 @@ static void destroy_inodecache(void)
219 219
220enum { 220enum {
221 Opt_help, Opt_uid, Opt_gid, Opt_umask, Opt_case_lower, Opt_case_asis, 221 Opt_help, Opt_uid, Opt_gid, Opt_umask, Opt_case_lower, Opt_case_asis,
222 Opt_conv_binary, Opt_conv_text, Opt_conv_auto,
223 Opt_check_none, Opt_check_normal, Opt_check_strict, 222 Opt_check_none, Opt_check_normal, Opt_check_strict,
224 Opt_err_cont, Opt_err_ro, Opt_err_panic, 223 Opt_err_cont, Opt_err_ro, Opt_err_panic,
225 Opt_eas_no, Opt_eas_ro, Opt_eas_rw, 224 Opt_eas_no, Opt_eas_ro, Opt_eas_rw,
@@ -234,9 +233,6 @@ static const match_table_t tokens = {
234 {Opt_umask, "umask=%o"}, 233 {Opt_umask, "umask=%o"},
235 {Opt_case_lower, "case=lower"}, 234 {Opt_case_lower, "case=lower"},
236 {Opt_case_asis, "case=asis"}, 235 {Opt_case_asis, "case=asis"},
237 {Opt_conv_binary, "conv=binary"},
238 {Opt_conv_text, "conv=text"},
239 {Opt_conv_auto, "conv=auto"},
240 {Opt_check_none, "check=none"}, 236 {Opt_check_none, "check=none"},
241 {Opt_check_normal, "check=normal"}, 237 {Opt_check_normal, "check=normal"},
242 {Opt_check_strict, "check=strict"}, 238 {Opt_check_strict, "check=strict"},
@@ -254,7 +250,7 @@ static const match_table_t tokens = {
254}; 250};
255 251
256static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask, 252static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
257 int *lowercase, int *conv, int *eas, int *chk, int *errs, 253 int *lowercase, int *eas, int *chk, int *errs,
258 int *chkdsk, int *timeshift) 254 int *chkdsk, int *timeshift)
259{ 255{
260 char *p; 256 char *p;
@@ -296,15 +292,6 @@ static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
296 case Opt_case_asis: 292 case Opt_case_asis:
297 *lowercase = 0; 293 *lowercase = 0;
298 break; 294 break;
299 case Opt_conv_binary:
300 *conv = CONV_BINARY;
301 break;
302 case Opt_conv_text:
303 *conv = CONV_TEXT;
304 break;
305 case Opt_conv_auto:
306 *conv = CONV_AUTO;
307 break;
308 case Opt_check_none: 295 case Opt_check_none:
309 *chk = 0; 296 *chk = 0;
310 break; 297 break;
@@ -371,9 +358,6 @@ HPFS filesystem options:\n\
371 umask=xxx set mode of files that don't have mode specified in eas\n\ 358 umask=xxx set mode of files that don't have mode specified in eas\n\
372 case=lower lowercase all files\n\ 359 case=lower lowercase all files\n\
373 case=asis do not lowercase files (default)\n\ 360 case=asis do not lowercase files (default)\n\
374 conv=binary do not convert CR/LF -> LF (default)\n\
375 conv=auto convert only files with known text extensions\n\
376 conv=text convert all files\n\
377 check=none no fs checks - kernel may crash on corrupted filesystem\n\ 361 check=none no fs checks - kernel may crash on corrupted filesystem\n\
378 check=normal do some checks - it should not crash (default)\n\ 362 check=normal do some checks - it should not crash (default)\n\
379 check=strict do extra time-consuming checks, used for debugging\n\ 363 check=strict do extra time-consuming checks, used for debugging\n\
@@ -395,7 +379,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
395 uid_t uid; 379 uid_t uid;
396 gid_t gid; 380 gid_t gid;
397 umode_t umask; 381 umode_t umask;
398 int lowercase, conv, eas, chk, errs, chkdsk, timeshift; 382 int lowercase, eas, chk, errs, chkdsk, timeshift;
399 int o; 383 int o;
400 struct hpfs_sb_info *sbi = hpfs_sb(s); 384 struct hpfs_sb_info *sbi = hpfs_sb(s);
401 char *new_opts = kstrdup(data, GFP_KERNEL); 385 char *new_opts = kstrdup(data, GFP_KERNEL);
@@ -406,11 +390,11 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
406 lock_super(s); 390 lock_super(s);
407 uid = sbi->sb_uid; gid = sbi->sb_gid; 391 uid = sbi->sb_uid; gid = sbi->sb_gid;
408 umask = 0777 & ~sbi->sb_mode; 392 umask = 0777 & ~sbi->sb_mode;
409 lowercase = sbi->sb_lowercase; conv = sbi->sb_conv; 393 lowercase = sbi->sb_lowercase;
410 eas = sbi->sb_eas; chk = sbi->sb_chk; chkdsk = sbi->sb_chkdsk; 394 eas = sbi->sb_eas; chk = sbi->sb_chk; chkdsk = sbi->sb_chkdsk;
411 errs = sbi->sb_err; timeshift = sbi->sb_timeshift; 395 errs = sbi->sb_err; timeshift = sbi->sb_timeshift;
412 396
413 if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, &conv, 397 if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase,
414 &eas, &chk, &errs, &chkdsk, &timeshift))) { 398 &eas, &chk, &errs, &chkdsk, &timeshift))) {
415 printk("HPFS: bad mount options.\n"); 399 printk("HPFS: bad mount options.\n");
416 goto out_err; 400 goto out_err;
@@ -428,7 +412,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
428 412
429 sbi->sb_uid = uid; sbi->sb_gid = gid; 413 sbi->sb_uid = uid; sbi->sb_gid = gid;
430 sbi->sb_mode = 0777 & ~umask; 414 sbi->sb_mode = 0777 & ~umask;
431 sbi->sb_lowercase = lowercase; sbi->sb_conv = conv; 415 sbi->sb_lowercase = lowercase;
432 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; 416 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk;
433 sbi->sb_err = errs; sbi->sb_timeshift = timeshift; 417 sbi->sb_err = errs; sbi->sb_timeshift = timeshift;
434 418
@@ -472,7 +456,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
472 uid_t uid; 456 uid_t uid;
473 gid_t gid; 457 gid_t gid;
474 umode_t umask; 458 umode_t umask;
475 int lowercase, conv, eas, chk, errs, chkdsk, timeshift; 459 int lowercase, eas, chk, errs, chkdsk, timeshift;
476 460
477 dnode_secno root_dno; 461 dnode_secno root_dno;
478 struct hpfs_dirent *de = NULL; 462 struct hpfs_dirent *de = NULL;
@@ -498,14 +482,13 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
498 gid = current_gid(); 482 gid = current_gid();
499 umask = current_umask(); 483 umask = current_umask();
500 lowercase = 0; 484 lowercase = 0;
501 conv = CONV_BINARY;
502 eas = 2; 485 eas = 2;
503 chk = 1; 486 chk = 1;
504 errs = 1; 487 errs = 1;
505 chkdsk = 1; 488 chkdsk = 1;
506 timeshift = 0; 489 timeshift = 0;
507 490
508 if (!(o = parse_opts(options, &uid, &gid, &umask, &lowercase, &conv, 491 if (!(o = parse_opts(options, &uid, &gid, &umask, &lowercase,
509 &eas, &chk, &errs, &chkdsk, &timeshift))) { 492 &eas, &chk, &errs, &chkdsk, &timeshift))) {
510 printk("HPFS: bad mount options.\n"); 493 printk("HPFS: bad mount options.\n");
511 goto bail0; 494 goto bail0;
@@ -558,7 +541,6 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
558 sbi->sb_n_free = -1; 541 sbi->sb_n_free = -1;
559 sbi->sb_n_free_dnodes = -1; 542 sbi->sb_n_free_dnodes = -1;
560 sbi->sb_lowercase = lowercase; 543 sbi->sb_lowercase = lowercase;
561 sbi->sb_conv = conv;
562 sbi->sb_eas = eas; 544 sbi->sb_eas = eas;
563 sbi->sb_chk = chk; 545 sbi->sb_chk = chk;
564 sbi->sb_chkdsk = chkdsk; 546 sbi->sb_chkdsk = chkdsk;