Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e85bed01
Commit
e85bed01
authored
Oct 05, 2003
by
Hirofumi Ogawa
Committed by
Linus Torvalds
Oct 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Fix cleanup option of fat (4/6)
This is just misc cleanup of fat option.
parent
0279de03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
90 deletions
+47
-90
fs/fat/inode.c
fs/fat/inode.c
+47
-90
No files found.
fs/fat/inode.c
View file @
e85bed01
...
@@ -246,25 +246,15 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
...
@@ -246,25 +246,15 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
return
0
;
return
0
;
}
}
static
void
print_obsolete_option
(
char
*
optname
)
{
printk
(
KERN_INFO
"FAT: %s option is obsolete, "
"not supported now
\n
"
,
optname
);
}
enum
{
enum
{
Opt_blocksize
,
Opt_charset
,
Opt_check_n
,
Opt_check_r
,
Opt_check_s
,
Opt_check_n
,
Opt_check_r
,
Opt_check_s
,
Opt_uid
,
Opt_gid
,
Opt_fat
,
Opt_codepage
,
Opt_conv_a
,
Opt_conv_b
,
Opt_conv_t
,
Opt_umask
,
Opt_dmask
,
Opt_fmask
,
Opt_codepage
,
Opt_nocase
,
Opt_debug
,
Opt_dots
,
Opt_err
,
Opt_gid
,
Opt_immutable
,
Opt_quiet
,
Opt_showexec
,
Opt_debug
,
Opt_immutable
,
Opt_nocase
,
Opt_nodots
,
Opt_quiet
,
Opt_showexec
,
Opt_uid
,
Opt_dots
,
Opt_nodots
,
Opt_shortname_lower
,
Opt_shortname_win95
,
Opt_shortname_winnt
,
Opt_shortname_mixed
,
Opt_charset
,
Opt_shortname_lower
,
Opt_shortname_win95
,
Opt_umask
,
Opt_dmask
,
Opt_fmask
,
Opt_posix
,
Opt_cvf_format
,
Opt_cvf_options
,
Opt_shortname_winnt
,
Opt_shortname_mixed
,
Opt_utf8_no
,
Opt_utf8_yes
,
Opt_utf8_off
,
Opt_utf8_no
,
Opt_utf8_false
,
Opt_uni_xl_no
,
Opt_uni_xl_yes
,
Opt_nonumtail_no
,
Opt_nonumtail_yes
,
Opt_utf8_on
,
Opt_utf8_yes
,
Opt_utf8_true
,
Opt_utf8_opt
,
Opt_obsolate
,
Opt_err
,
Opt_uni_xl_off
,
Opt_uni_xl_no
,
Opt_uni_xl_false
,
Opt_uni_xl_on
,
Opt_uni_xl_yes
,
Opt_uni_xl_true
,
Opt_uni_xl_opt
,
Opt_nonumtail_off
,
Opt_nonumtail_no
,
Opt_nonumtail_false
,
Opt_nonumtail_on
,
Opt_nonumtail_yes
,
Opt_nonumtail_true
,
Opt_nonumtail_opt
,
};
};
static
match_table_t
fat_tokens
=
{
static
match_table_t
fat_tokens
=
{
...
@@ -274,35 +264,35 @@ static match_table_t fat_tokens = {
...
@@ -274,35 +264,35 @@ static match_table_t fat_tokens = {
{
Opt_check_r
,
"check=r"
},
{
Opt_check_r
,
"check=r"
},
{
Opt_check_s
,
"check=s"
},
{
Opt_check_s
,
"check=s"
},
{
Opt_check_n
,
"check=n"
},
{
Opt_check_n
,
"check=n"
},
{
Opt_conv_b
,
"conv=binary"
},
{
Opt_conv_t
,
"conv=text"
},
{
Opt_conv_a
,
"conv=auto"
},
{
Opt_conv_b
,
"conv=b"
},
{
Opt_conv_t
,
"conv=t"
},
{
Opt_conv_a
,
"conv=a"
},
{
Opt_uid
,
"uid=%d"
},
{
Opt_uid
,
"uid=%d"
},
{
Opt_gid
,
"gid=%d"
},
{
Opt_gid
,
"gid=%d"
},
{
Opt_umask
,
"umask=%o"
},
{
Opt_umask
,
"umask=%o"
},
{
Opt_dmask
,
"dmask=%o"
},
{
Opt_dmask
,
"dmask=%o"
},
{
Opt_fmask
,
"fmask=%o"
},
{
Opt_fmask
,
"fmask=%o"
},
{
Opt_fat
,
"fat=%d"
},
{
Opt_codepage
,
"codepage=%d"
},
{
Opt_codepage
,
"codepage=%d"
},
{
Opt_blocksize
,
"blocksize=%d"
},
{
Opt_nocase
,
"nocase"
},
{
Opt_nocase
,
"nocase"
},
{
Opt_cvf_format
,
"cvf_format=%20s"
},
{
Opt_cvf_options
,
"cvf_options=%100s"
},
{
Opt_quiet
,
"quiet"
},
{
Opt_quiet
,
"quiet"
},
{
Opt_showexec
,
"showexec"
},
{
Opt_showexec
,
"showexec"
},
{
Opt_debug
,
"debug"
},
{
Opt_debug
,
"debug"
},
{
Opt_immutable
,
"sys_immutable"
},
{
Opt_immutable
,
"sys_immutable"
},
{
Opt_posix
,
"posix"
},
{
Opt_obsolate
,
"conv=binary"
},
{
Opt_obsolate
,
"conv=text"
},
{
Opt_obsolate
,
"conv=auto"
},
{
Opt_obsolate
,
"conv=b"
},
{
Opt_obsolate
,
"conv=t"
},
{
Opt_obsolate
,
"conv=a"
},
{
Opt_obsolate
,
"fat=%d"
},
{
Opt_obsolate
,
"blocksize=%d"
},
{
Opt_obsolate
,
"cvf_format=%20s"
},
{
Opt_obsolate
,
"cvf_options=%100s"
},
{
Opt_obsolate
,
"posix"
},
{
Opt_err
,
NULL
}
{
Opt_err
,
NULL
}
};
};
static
match_table_t
msdos_tokens
=
{
static
match_table_t
msdos_tokens
=
{
{
Opt_nodots
,
"nodots"
},
{
Opt_nodots
,
"nodots"
},
{
Opt_nodots
,
"dotsOK=no"
},
{
Opt_nodots
,
"dotsOK=no"
},
{
Opt_dots
,
"dotsOK=yes"
},
{
Opt_dots
,
"dots"
},
{
Opt_dots
,
"dots"
},
{
Opt_dots
,
"dotsOK=yes"
},
{
Opt_err
,
NULL
}
{
Opt_err
,
NULL
}
};
};
static
match_table_t
vfat_tokens
=
{
static
match_table_t
vfat_tokens
=
{
...
@@ -311,27 +301,27 @@ static match_table_t vfat_tokens = {
...
@@ -311,27 +301,27 @@ static match_table_t vfat_tokens = {
{
Opt_shortname_win95
,
"shortname=win95"
},
{
Opt_shortname_win95
,
"shortname=win95"
},
{
Opt_shortname_winnt
,
"shortname=winnt"
},
{
Opt_shortname_winnt
,
"shortname=winnt"
},
{
Opt_shortname_mixed
,
"shortname=mixed"
},
{
Opt_shortname_mixed
,
"shortname=mixed"
},
{
Opt_utf8_
off
,
"utf8=0"
},
/* 0 or no or false */
{
Opt_utf8_
no
,
"utf8=0"
},
/* 0 or no or false */
{
Opt_utf8_no
,
"utf8=no"
},
{
Opt_utf8_no
,
"utf8=no"
},
{
Opt_utf8_
false
,
"utf8=false"
},
{
Opt_utf8_
no
,
"utf8=false"
},
{
Opt_utf8_
on
,
"utf8=1"
},
/* empty or 1 or yes or true */
{
Opt_utf8_
yes
,
"utf8=1"
},
/* empty or 1 or yes or true */
{
Opt_utf8_yes
,
"utf8=yes"
},
{
Opt_utf8_yes
,
"utf8=yes"
},
{
Opt_utf8_
true
,
"utf8=true"
},
{
Opt_utf8_
yes
,
"utf8=true"
},
{
Opt_utf8_
opt
,
"utf8"
},
{
Opt_utf8_
yes
,
"utf8"
},
{
Opt_uni_xl_
off
,
"uni_xlate=0"
},
/* 0 or no or false */
{
Opt_uni_xl_
no
,
"uni_xlate=0"
},
/* 0 or no or false */
{
Opt_uni_xl_no
,
"uni_xlate=no"
},
{
Opt_uni_xl_no
,
"uni_xlate=no"
},
{
Opt_uni_xl_
false
,
"uni_xlate=false"
},
{
Opt_uni_xl_
no
,
"uni_xlate=false"
},
{
Opt_uni_xl_
on
,
"uni_xlate=1"
},
/* empty or 1 or yes or true */
{
Opt_uni_xl_
yes
,
"uni_xlate=1"
},
/* empty or 1 or yes or true */
{
Opt_uni_xl_yes
,
"uni_xlate=yes"
},
{
Opt_uni_xl_yes
,
"uni_xlate=yes"
},
{
Opt_uni_xl_
true
,
"uni_xlate=true"
},
{
Opt_uni_xl_
yes
,
"uni_xlate=true"
},
{
Opt_uni_xl_
opt
,
"uni_xlate"
},
{
Opt_uni_xl_
yes
,
"uni_xlate"
},
{
Opt_nonumtail_
off
,
"nonumtail=0"
},
/* 0 or no or false */
{
Opt_nonumtail_
no
,
"nonumtail=0"
},
/* 0 or no or false */
{
Opt_nonumtail_no
,
"nonumtail=no"
},
{
Opt_nonumtail_no
,
"nonumtail=no"
},
{
Opt_nonumtail_
false
,
"nonumtail=false"
},
{
Opt_nonumtail_
no
,
"nonumtail=false"
},
{
Opt_nonumtail_
on
,
"nonumtail=1"
},
/* empty or 1 or yes or true */
{
Opt_nonumtail_
yes
,
"nonumtail=1"
},
/* empty or 1 or yes or true */
{
Opt_nonumtail_yes
,
"nonumtail=yes"
},
{
Opt_nonumtail_yes
,
"nonumtail=yes"
},
{
Opt_nonumtail_
true
,
"nonumtail=true"
},
{
Opt_nonumtail_
yes
,
"nonumtail=true"
},
{
Opt_nonumtail_
opt
,
"nonumtail"
},
{
Opt_nonumtail_
yes
,
"nonumtail"
},
{
Opt_err
,
NULL
}
{
Opt_err
,
NULL
}
};
};
...
@@ -380,10 +370,10 @@ static int parse_options(char *options, int is_vfat, int *debug,
...
@@ -380,10 +370,10 @@ static int parse_options(char *options, int is_vfat, int *debug,
opts
->
name_check
=
's'
;
opts
->
name_check
=
's'
;
break
;
break
;
case
Opt_check_r
:
case
Opt_check_r
:
opts
->
name_check
=
'r'
;
opts
->
name_check
=
'r'
;
break
;
break
;
case
Opt_check_n
:
case
Opt_check_n
:
opts
->
name_check
=
'n'
;
opts
->
name_check
=
'n'
;
break
;
break
;
case
Opt_nocase
:
case
Opt_nocase
:
if
(
!
is_vfat
)
if
(
!
is_vfat
)
...
@@ -435,8 +425,6 @@ static int parse_options(char *options, int is_vfat, int *debug,
...
@@ -435,8 +425,6 @@ static int parse_options(char *options, int is_vfat, int *debug,
if
(
match_int
(
&
args
[
0
],
&
option
))
if
(
match_int
(
&
args
[
0
],
&
option
))
return
0
;
return
0
;
opts
->
codepage
=
option
;
opts
->
codepage
=
option
;
printk
(
"MSDOS FS: Using codepage %d
\n
"
,
opts
->
codepage
);
break
;
break
;
/* msdos specific */
/* msdos specific */
...
@@ -453,8 +441,6 @@ static int parse_options(char *options, int is_vfat, int *debug,
...
@@ -453,8 +441,6 @@ static int parse_options(char *options, int is_vfat, int *debug,
opts
->
iocharset
=
match_strdup
(
&
args
[
0
]);
opts
->
iocharset
=
match_strdup
(
&
args
[
0
]);
if
(
!
opts
->
iocharset
)
if
(
!
opts
->
iocharset
)
return
0
;
return
0
;
printk
(
"MSDOS FS: IO charset %s
\n
"
,
opts
->
iocharset
);
break
;
break
;
case
Opt_shortname_lower
:
case
Opt_shortname_lower
:
opts
->
shortname
=
VFAT_SFN_DISPLAY_LOWER
opts
->
shortname
=
VFAT_SFN_DISPLAY_LOWER
...
@@ -472,63 +458,34 @@ static int parse_options(char *options, int is_vfat, int *debug,
...
@@ -472,63 +458,34 @@ static int parse_options(char *options, int is_vfat, int *debug,
opts
->
shortname
=
VFAT_SFN_DISPLAY_WINNT
opts
->
shortname
=
VFAT_SFN_DISPLAY_WINNT
|
VFAT_SFN_CREATE_WIN95
;
|
VFAT_SFN_CREATE_WIN95
;
break
;
break
;
case
Opt_utf8_off
:
/* 0 or no or false */
case
Opt_utf8_no
:
/* 0 or no or false */
case
Opt_utf8_no
:
case
Opt_utf8_false
:
opts
->
utf8
=
0
;
opts
->
utf8
=
0
;
break
;
break
;
case
Opt_utf8_on
:
/* empty or 1 or yes or true */
case
Opt_utf8_yes
:
/* empty or 1 or yes or true */
case
Opt_utf8_opt
:
case
Opt_utf8_yes
:
case
Opt_utf8_true
:
opts
->
utf8
=
1
;
opts
->
utf8
=
1
;
break
;
break
;
case
Opt_uni_xl_off
:
/* 0 or no or false */
case
Opt_uni_xl_no
:
/* 0 or no or false */
case
Opt_uni_xl_no
:
case
Opt_uni_xl_false
:
opts
->
unicode_xlate
=
0
;
opts
->
unicode_xlate
=
0
;
break
;
break
;
case
Opt_uni_xl_on
:
/* empty or 1 or yes or true */
case
Opt_uni_xl_yes
:
/* empty or 1 or yes or true */
case
Opt_uni_xl_yes
:
case
Opt_uni_xl_true
:
case
Opt_uni_xl_opt
:
opts
->
unicode_xlate
=
1
;
opts
->
unicode_xlate
=
1
;
break
;
break
;
case
Opt_nonumtail_off
:
/* 0 or no or false */
case
Opt_nonumtail_no
:
/* 0 or no or false */
case
Opt_nonumtail_no
:
case
Opt_nonumtail_false
:
opts
->
numtail
=
1
;
/* negated option */
opts
->
numtail
=
1
;
/* negated option */
break
;
break
;
case
Opt_nonumtail_on
:
/* empty or 1 or yes or true */
case
Opt_nonumtail_yes
:
/* empty or 1 or yes or true */
case
Opt_nonumtail_yes
:
case
Opt_nonumtail_true
:
case
Opt_nonumtail_opt
:
opts
->
numtail
=
0
;
/* negated option */
opts
->
numtail
=
0
;
/* negated option */
break
;
break
;
/* obsolete mount options */
/* obsolete mount options */
case
Opt_conv_b
:
case
Opt_obsolate
:
case
Opt_conv_t
:
printk
(
KERN_INFO
"FAT:
\"
%s
\"
option is obsolete, "
case
Opt_conv_a
:
"not supported now
\n
"
,
p
);
print_obsolete_option
(
"conv"
);
break
;
case
Opt_blocksize
:
print_obsolete_option
(
"blocksize"
);
break
;
case
Opt_posix
:
print_obsolete_option
(
"posix"
);
break
;
case
Opt_fat
:
print_obsolete_option
(
"fat"
);
break
;
case
Opt_cvf_format
:
case
Opt_cvf_options
:
print_obsolete_option
(
"cvf"
);
break
;
break
;
/* unknown option */
/* unknown option */
default:
default:
printk
(
KERN_ERR
"FAT: Unrecognized mount option
\"
%s
\"
"
printk
(
KERN_ERR
"FAT: Unrecognized mount option
\"
%s
\"
"
"or missing value
\n
"
,
p
);
"or missing value
\n
"
,
p
);
return
0
;
return
0
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment