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
f6db25a8
Commit
f6db25a8
authored
May 23, 2010
by
Phillip Lougher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squashfs: constify xattr handlers
Signed-off-by:
Phillip Lougher
<
phillip@lougher.demon.co.uk
>
parent
0f87ee08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
fs/squashfs/squashfs.h
fs/squashfs/squashfs.h
+1
-1
fs/squashfs/xattr.c
fs/squashfs/xattr.c
+7
-7
No files found.
fs/squashfs/squashfs.h
View file @
f6db25a8
...
...
@@ -100,7 +100,7 @@ extern const struct address_space_operations squashfs_symlink_aops;
extern
const
struct
inode_operations
squashfs_symlink_inode_ops
;
/* xattr.c */
extern
struct
xattr_handler
*
squashfs_xattr_handlers
[];
extern
const
struct
xattr_handler
*
squashfs_xattr_handlers
[];
/* zlib_wrapper.c */
extern
const
struct
squashfs_decompressor
squashfs_zlib_comp_ops
;
fs/squashfs/xattr.c
View file @
f6db25a8
...
...
@@ -34,7 +34,7 @@
#include "squashfs_fs_i.h"
#include "squashfs.h"
static
struct
xattr_handler
*
squashfs_xattr_handler
(
int
);
static
const
struct
xattr_handler
*
squashfs_xattr_handler
(
int
);
ssize_t
squashfs_listxattr
(
struct
dentry
*
d
,
char
*
buffer
,
size_t
buffer_size
)
...
...
@@ -57,7 +57,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
while
(
count
--
)
{
struct
squashfs_xattr_entry
entry
;
struct
squashfs_xattr_val
val
;
struct
xattr_handler
*
handler
;
const
struct
xattr_handler
*
handler
;
int
name_size
,
prefix_size
=
0
;
err
=
squashfs_read_metadata
(
sb
,
&
entry
,
&
start
,
&
offset
,
...
...
@@ -228,7 +228,7 @@ static int squashfs_user_get(struct dentry *d, const char *name, void *buffer,
buffer
,
size
);
}
static
struct
xattr_handler
squashfs_xattr_user_handler
=
{
static
const
struct
xattr_handler
squashfs_xattr_user_handler
=
{
.
prefix
=
XATTR_USER_PREFIX
,
.
list
=
squashfs_user_list
,
.
get
=
squashfs_user_get
...
...
@@ -258,7 +258,7 @@ static int squashfs_trusted_get(struct dentry *d, const char *name,
buffer
,
size
);
}
static
struct
xattr_handler
squashfs_xattr_trusted_handler
=
{
static
const
struct
xattr_handler
squashfs_xattr_trusted_handler
=
{
.
prefix
=
XATTR_TRUSTED_PREFIX
,
.
list
=
squashfs_trusted_list
,
.
get
=
squashfs_trusted_get
...
...
@@ -285,13 +285,13 @@ static int squashfs_security_get(struct dentry *d, const char *name,
buffer
,
size
);
}
static
struct
xattr_handler
squashfs_xattr_security_handler
=
{
static
const
struct
xattr_handler
squashfs_xattr_security_handler
=
{
.
prefix
=
XATTR_SECURITY_PREFIX
,
.
list
=
squashfs_security_list
,
.
get
=
squashfs_security_get
};
static
inline
struct
xattr_handler
*
squashfs_xattr_handler
(
int
type
)
static
inline
const
struct
xattr_handler
*
squashfs_xattr_handler
(
int
type
)
{
if
(
type
&
~
(
SQUASHFS_XATTR_PREFIX_MASK
|
SQUASHFS_XATTR_VALUE_OOL
))
/* ignore unrecognised type */
...
...
@@ -310,7 +310,7 @@ static inline struct xattr_handler *squashfs_xattr_handler(int type)
}
}
struct
xattr_handler
*
squashfs_xattr_handlers
[]
=
{
const
struct
xattr_handler
*
squashfs_xattr_handlers
[]
=
{
&
squashfs_xattr_user_handler
,
&
squashfs_xattr_trusted_handler
,
&
squashfs_xattr_security_handler
,
...
...
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