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
ac465e61
Commit
ac465e61
authored
Oct 12, 2002
by
Hirofumi Ogawa
Committed by
Linus Torvalds
Oct 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix error code which fat_fill_super() returns (1/5)
This fixes the error code which fat_fill_super() returns.
parent
a27bb86b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
fs/fat/inode.c
fs/fat/inode.c
+8
-2
fs/msdos/namei.c
fs/msdos/namei.c
+1
-5
fs/vfat/namei.c
fs/vfat/namei.c
+1
-5
No files found.
fs/fat/inode.c
View file @
ac465e61
...
@@ -639,7 +639,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
...
@@ -639,7 +639,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
int
logical_sector_size
,
fat_clusters
,
debug
,
cp
,
first
;
int
logical_sector_size
,
fat_clusters
,
debug
,
cp
,
first
;
unsigned
int
total_sectors
,
rootdir_sectors
;
unsigned
int
total_sectors
,
rootdir_sectors
;
unsigned
char
media
;
unsigned
char
media
;
long
error
=
-
EIO
;
long
error
;
char
buf
[
50
];
char
buf
[
50
];
int
i
;
int
i
;
char
cvf_format
[
21
];
char
cvf_format
[
21
];
...
@@ -662,6 +662,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
...
@@ -662,6 +662,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
sbi
->
dir_ops
=
fs_dir_inode_ops
;
sbi
->
dir_ops
=
fs_dir_inode_ops
;
sbi
->
cvf_format
=
&
default_cvf
;
sbi
->
cvf_format
=
&
default_cvf
;
error
=
-
EINVAL
;
if
(
!
parse_options
((
char
*
)
data
,
&
debug
,
&
sbi
->
options
,
if
(
!
parse_options
((
char
*
)
data
,
&
debug
,
&
sbi
->
options
,
cvf_format
,
cvf_options
))
cvf_format
,
cvf_options
))
goto
out_fail
;
goto
out_fail
;
...
@@ -670,6 +671,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
...
@@ -670,6 +671,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
/* set up enough so that it can read an inode */
/* set up enough so that it can read an inode */
init_MUTEX
(
&
sbi
->
fat_lock
);
init_MUTEX
(
&
sbi
->
fat_lock
);
error
=
-
EIO
;
sb_min_blocksize
(
sb
,
512
);
sb_min_blocksize
(
sb
,
512
);
bh
=
sb_bread
(
sb
,
0
);
bh
=
sb_bread
(
sb
,
0
);
if
(
bh
==
NULL
)
{
if
(
bh
==
NULL
)
{
...
@@ -848,13 +850,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
...
@@ -848,13 +850,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
goto
out_invalid
;
goto
out_invalid
;
}
}
error
=
-
EINVAL
;
if
(
!
strcmp
(
cvf_format
,
"none"
))
if
(
!
strcmp
(
cvf_format
,
"none"
))
i
=
-
1
;
i
=
-
1
;
else
else
i
=
detect_cvf
(
sb
,
cvf_format
);
i
=
detect_cvf
(
sb
,
cvf_format
);
if
(
i
>=
0
)
{
if
(
i
>=
0
)
{
if
(
cvf_formats
[
i
]
->
mount_cvf
(
sb
,
cvf_options
))
if
(
cvf_formats
[
i
]
->
mount_cvf
(
sb
,
cvf_options
))
goto
out_
invalid
;
goto
out_
fail
;
}
}
cp
=
sbi
->
options
.
codepage
?
sbi
->
options
.
codepage
:
437
;
cp
=
sbi
->
options
.
codepage
?
sbi
->
options
.
codepage
:
437
;
...
@@ -912,6 +915,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
...
@@ -912,6 +915,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
out_invalid:
out_invalid:
error
=
-
EINVAL
;
error
=
-
EINVAL
;
if
(
!
silent
)
printk
(
KERN_INFO
"VFS: Can't find a valid FAT filesystem"
" on dev %s.
\n
"
,
sb
->
s_id
);
out_fail:
out_fail:
if
(
root_inode
)
if
(
root_inode
)
...
...
fs/msdos/namei.c
View file @
ac465e61
...
@@ -604,12 +604,8 @@ int msdos_fill_super(struct super_block *sb,void *data, int silent)
...
@@ -604,12 +604,8 @@ int msdos_fill_super(struct super_block *sb,void *data, int silent)
int
res
;
int
res
;
res
=
fat_fill_super
(
sb
,
data
,
silent
,
&
msdos_dir_inode_operations
,
0
);
res
=
fat_fill_super
(
sb
,
data
,
silent
,
&
msdos_dir_inode_operations
,
0
);
if
(
res
)
{
if
(
res
)
if
(
res
==
-
EINVAL
&&
!
silent
)
printk
(
KERN_INFO
"VFS: Can't find a valid"
" MSDOS filesystem on dev %s.
\n
"
,
sb
->
s_id
);
return
res
;
return
res
;
}
sb
->
s_root
->
d_op
=
&
msdos_dentry_operations
;
sb
->
s_root
->
d_op
=
&
msdos_dentry_operations
;
return
0
;
return
0
;
...
...
fs/vfat/namei.c
View file @
ac465e61
...
@@ -1284,12 +1284,8 @@ int vfat_fill_super(struct super_block *sb, void *data, int silent)
...
@@ -1284,12 +1284,8 @@ int vfat_fill_super(struct super_block *sb, void *data, int silent)
struct
msdos_sb_info
*
sbi
;
struct
msdos_sb_info
*
sbi
;
res
=
fat_fill_super
(
sb
,
data
,
silent
,
&
vfat_dir_inode_operations
,
1
);
res
=
fat_fill_super
(
sb
,
data
,
silent
,
&
vfat_dir_inode_operations
,
1
);
if
(
res
)
{
if
(
res
)
if
(
res
==
-
EINVAL
&&
!
silent
)
printk
(
KERN_INFO
"VFS: Can't find a valid"
" VFAT filesystem on dev %s.
\n
"
,
sb
->
s_id
);
return
res
;
return
res
;
}
sbi
=
MSDOS_SB
(
sb
);
sbi
=
MSDOS_SB
(
sb
);
...
...
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