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
nexedi
linux
Commits
e1ee7d85
Commit
e1ee7d85
authored
Dec 21, 2019
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cramfs: switch to use of errofc() et.al.
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
77cb271e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
fs/cramfs/inode.c
fs/cramfs/inode.c
+7
-7
No files found.
fs/cramfs/inode.c
View file @
e1ee7d85
...
...
@@ -534,7 +534,7 @@ static int cramfs_read_super(struct super_block *sb, struct fs_context *fc,
/* check for wrong endianness */
if
(
super
->
magic
==
CRAMFS_MAGIC_WEND
)
{
if
(
!
silent
)
errorf
(
fc
,
"cramfs:
wrong endianness"
);
errorf
c
(
fc
,
"
wrong endianness"
);
return
-
EINVAL
;
}
...
...
@@ -546,22 +546,22 @@ static int cramfs_read_super(struct super_block *sb, struct fs_context *fc,
mutex_unlock
(
&
read_mutex
);
if
(
super
->
magic
!=
CRAMFS_MAGIC
)
{
if
(
super
->
magic
==
CRAMFS_MAGIC_WEND
&&
!
silent
)
errorf
(
fc
,
"cramfs:
wrong endianness"
);
errorf
c
(
fc
,
"
wrong endianness"
);
else
if
(
!
silent
)
errorf
(
fc
,
"cramfs:
wrong magic"
);
errorf
c
(
fc
,
"
wrong magic"
);
return
-
EINVAL
;
}
}
/* get feature flags first */
if
(
super
->
flags
&
~
CRAMFS_SUPPORTED_FLAGS
)
{
errorf
(
fc
,
"cramfs:
unsupported filesystem features"
);
errorf
c
(
fc
,
"
unsupported filesystem features"
);
return
-
EINVAL
;
}
/* Check that the root inode is in a sane state */
if
(
!
S_ISDIR
(
super
->
root
.
mode
))
{
errorf
(
fc
,
"cramfs:
root is not a directory"
);
errorf
c
(
fc
,
"
root is not a directory"
);
return
-
EINVAL
;
}
/* correct strange, hard-coded permissions of mkcramfs */
...
...
@@ -580,12 +580,12 @@ static int cramfs_read_super(struct super_block *sb, struct fs_context *fc,
sbi
->
magic
=
super
->
magic
;
sbi
->
flags
=
super
->
flags
;
if
(
root_offset
==
0
)
infof
(
fc
,
"cramfs:
empty filesystem"
);
infof
c
(
fc
,
"
empty filesystem"
);
else
if
(
!
(
super
->
flags
&
CRAMFS_FLAG_SHIFTED_ROOT_OFFSET
)
&&
((
root_offset
!=
sizeof
(
struct
cramfs_super
))
&&
(
root_offset
!=
512
+
sizeof
(
struct
cramfs_super
))))
{
errorf
(
fc
,
"cramfs:
bad root offset %lu"
,
root_offset
);
errorf
c
(
fc
,
"
bad root offset %lu"
,
root_offset
);
return
-
EINVAL
;
}
...
...
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