aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r--fs/fat/inode.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 7aaa21cf019a..0da04e6d1e34 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -797,8 +797,10 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
797 seq_puts(m, ",uni_xlate"); 797 seq_puts(m, ",uni_xlate");
798 if (!opts->numtail) 798 if (!opts->numtail)
799 seq_puts(m, ",nonumtail"); 799 seq_puts(m, ",nonumtail");
800 if (opts->rodir)
801 seq_puts(m, ",rodir");
800 } 802 }
801 if (sbi->options.flush) 803 if (opts->flush)
802 seq_puts(m, ",flush"); 804 seq_puts(m, ",flush");
803 if (opts->tz_utc) 805 if (opts->tz_utc)
804 seq_puts(m, ",tz=UTC"); 806 seq_puts(m, ",tz=UTC");
@@ -814,7 +816,7 @@ enum {
814 Opt_charset, Opt_shortname_lower, Opt_shortname_win95, 816 Opt_charset, Opt_shortname_lower, Opt_shortname_win95,
815 Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes, 817 Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes,
816 Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes, 818 Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes,
817 Opt_obsolate, Opt_flush, Opt_tz_utc, Opt_err, 819 Opt_obsolate, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err,
818}; 820};
819 821
820static const match_table_t fat_tokens = { 822static const match_table_t fat_tokens = {
@@ -886,6 +888,7 @@ static const match_table_t vfat_tokens = {
886 {Opt_nonumtail_yes, "nonumtail=yes"}, 888 {Opt_nonumtail_yes, "nonumtail=yes"},
887 {Opt_nonumtail_yes, "nonumtail=true"}, 889 {Opt_nonumtail_yes, "nonumtail=true"},
888 {Opt_nonumtail_yes, "nonumtail"}, 890 {Opt_nonumtail_yes, "nonumtail"},
891 {Opt_rodir, "rodir"},
889 {Opt_err, NULL} 892 {Opt_err, NULL}
890}; 893};
891 894
@@ -905,10 +908,13 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
905 opts->allow_utime = -1; 908 opts->allow_utime = -1;
906 opts->codepage = fat_default_codepage; 909 opts->codepage = fat_default_codepage;
907 opts->iocharset = fat_default_iocharset; 910 opts->iocharset = fat_default_iocharset;
908 if (is_vfat) 911 if (is_vfat) {
909 opts->shortname = VFAT_SFN_DISPLAY_LOWER|VFAT_SFN_CREATE_WIN95; 912 opts->shortname = VFAT_SFN_DISPLAY_LOWER|VFAT_SFN_CREATE_WIN95;
910 else 913 opts->rodir = 0;
914 } else {
911 opts->shortname = 0; 915 opts->shortname = 0;
916 opts->rodir = 1;
917 }
912 opts->name_check = 'n'; 918 opts->name_check = 'n';
913 opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; 919 opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
914 opts->utf8 = opts->unicode_xlate = 0; 920 opts->utf8 = opts->unicode_xlate = 0;
@@ -1059,6 +1065,9 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
1059 case Opt_nonumtail_yes: /* empty or 1 or yes or true */ 1065 case Opt_nonumtail_yes: /* empty or 1 or yes or true */
1060 opts->numtail = 0; /* negated option */ 1066 opts->numtail = 0; /* negated option */
1061 break; 1067 break;
1068 case Opt_rodir:
1069 opts->rodir = 1;
1070 break;
1062 1071
1063 /* obsolete mount options */ 1072 /* obsolete mount options */
1064 case Opt_obsolate: 1073 case Opt_obsolate: