diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 23:21:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 23:21:28 -0400 |
commit | bd4c625c061c2a38568d0add3478f59172455159 (patch) | |
tree | 1c44a17c55bce2ee7ad5ea3d15a208ecc0955f74 /fs/reiserfs/xattr_security.c | |
parent | 7fa94c8868edfef8cb6a201fcc9a5078b7b961da (diff) |
reiserfs: run scripts/Lindent on reiserfs code
This was a pure indentation change, using:
scripts/Lindent fs/reiserfs/*.c include/linux/reiserfs_*.h
to make reiserfs match the regular Linux indentation style. As Jeff
Mahoney <jeffm@suse.com> writes:
The ReiserFS code is a mix of a number of different coding styles, sometimes
different even from line-to-line. Since the code has been relatively stable
for quite some time and there are few outstanding patches to be applied, it
is time to reformat the code to conform to the Linux style standard outlined
in Documentation/CodingStyle.
This patch contains the result of running scripts/Lindent against
fs/reiserfs/*.c and include/linux/reiserfs_*.h. There are places where the
code can be made to look better, but I'd rather keep those patches separate
so that there isn't a subtle by-hand hand accident in the middle of a huge
patch. To be clear: This patch is reformatting *only*.
A number of patches may follow that continue to make the code more consistent
with the Linux coding style.
Hans wasn't particularly enthusiastic about these patches, but said he
wouldn't really oppose them either.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/xattr_security.c')
-rw-r--r-- | fs/reiserfs/xattr_security.c | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index e044d5117117..5e90a95ad60b 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -9,57 +9,55 @@ | |||
9 | #define XATTR_SECURITY_PREFIX "security." | 9 | #define XATTR_SECURITY_PREFIX "security." |
10 | 10 | ||
11 | static int | 11 | static int |
12 | security_get (struct inode *inode, const char *name, void *buffer, size_t size) | 12 | security_get(struct inode *inode, const char *name, void *buffer, size_t size) |
13 | { | 13 | { |
14 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) | 14 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) |
15 | return -EINVAL; | 15 | return -EINVAL; |
16 | 16 | ||
17 | if (is_reiserfs_priv_object(inode)) | 17 | if (is_reiserfs_priv_object(inode)) |
18 | return -EPERM; | 18 | return -EPERM; |
19 | 19 | ||
20 | return reiserfs_xattr_get (inode, name, buffer, size); | 20 | return reiserfs_xattr_get(inode, name, buffer, size); |
21 | } | 21 | } |
22 | 22 | ||
23 | static int | 23 | static int |
24 | security_set (struct inode *inode, const char *name, const void *buffer, | 24 | security_set(struct inode *inode, const char *name, const void *buffer, |
25 | size_t size, int flags) | 25 | size_t size, int flags) |
26 | { | 26 | { |
27 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) | 27 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) |
28 | return -EINVAL; | 28 | return -EINVAL; |
29 | 29 | ||
30 | if (is_reiserfs_priv_object(inode)) | 30 | if (is_reiserfs_priv_object(inode)) |
31 | return -EPERM; | 31 | return -EPERM; |
32 | 32 | ||
33 | return reiserfs_xattr_set (inode, name, buffer, size, flags); | 33 | return reiserfs_xattr_set(inode, name, buffer, size, flags); |
34 | } | 34 | } |
35 | 35 | ||
36 | static int | 36 | static int security_del(struct inode *inode, const char *name) |
37 | security_del (struct inode *inode, const char *name) | ||
38 | { | 37 | { |
39 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) | 38 | if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) |
40 | return -EINVAL; | 39 | return -EINVAL; |
41 | 40 | ||
42 | if (is_reiserfs_priv_object(inode)) | 41 | if (is_reiserfs_priv_object(inode)) |
43 | return -EPERM; | 42 | return -EPERM; |
44 | 43 | ||
45 | return 0; | 44 | return 0; |
46 | } | 45 | } |
47 | 46 | ||
48 | static int | 47 | static int |
49 | security_list (struct inode *inode, const char *name, int namelen, char *out) | 48 | security_list(struct inode *inode, const char *name, int namelen, char *out) |
50 | { | 49 | { |
51 | int len = namelen; | 50 | int len = namelen; |
52 | 51 | ||
53 | if (is_reiserfs_priv_object(inode)) | 52 | if (is_reiserfs_priv_object(inode)) |
54 | return 0; | 53 | return 0; |
55 | 54 | ||
56 | if (out) | 55 | if (out) |
57 | memcpy (out, name, len); | 56 | memcpy(out, name, len); |
58 | 57 | ||
59 | return len; | 58 | return len; |
60 | } | 59 | } |
61 | 60 | ||
62 | |||
63 | struct reiserfs_xattr_handler security_handler = { | 61 | struct reiserfs_xattr_handler security_handler = { |
64 | .prefix = XATTR_SECURITY_PREFIX, | 62 | .prefix = XATTR_SECURITY_PREFIX, |
65 | .get = security_get, | 63 | .get = security_get, |