Commit 42b1337f authored by Nathan Scott's avatar Nathan Scott Committed by Linus Torvalds

[PATCH] xattr updates (minor, 3/4)

This next incremental patch tidies up the data types passed back
from the `list' and `get' extended attribute syscalls - these now
match the design (ie. using ssize_t) rather than simply using long
or int everywhere; also now use const types in the VFS interface,
where appropriate.

Nathan
parent b8116216
......@@ -138,10 +138,10 @@ sys_fsetxattr(int fd, char *name, void *value, size_t size, int flags)
/*
* Extended attribute GET operations
*/
static long
static ssize_t
getxattr(struct dentry *d, char *name, void *value, size_t size)
{
int error;
ssize_t error;
void *kvalue;
char kname[XATTR_NAME_MAX + 1];
......@@ -169,11 +169,11 @@ getxattr(struct dentry *d, char *name, void *value, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_getxattr(char *path, char *name, void *value, size_t size)
{
struct nameidata nd;
int error;
ssize_t error;
error = user_path_walk(path, &nd);
if (error)
......@@ -183,11 +183,11 @@ sys_getxattr(char *path, char *name, void *value, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_lgetxattr(char *path, char *name, void *value, size_t size)
{
struct nameidata nd;
int error;
ssize_t error;
error = user_path_walk_link(path, &nd);
if (error)
......@@ -197,11 +197,11 @@ sys_lgetxattr(char *path, char *name, void *value, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_fgetxattr(int fd, char *name, void *value, size_t size)
{
struct file *f;
int error = -EBADF;
ssize_t error = -EBADF;
f = fget(fd);
if (!f)
......@@ -214,10 +214,10 @@ sys_fgetxattr(int fd, char *name, void *value, size_t size)
/*
* Extended attribute LIST operations
*/
static long
static ssize_t
listxattr(struct dentry *d, char *list, size_t size)
{
int error;
ssize_t error;
char *klist;
klist = (char *)xattr_alloc(size, XATTR_LIST_MAX);
......@@ -238,11 +238,11 @@ listxattr(struct dentry *d, char *list, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_listxattr(char *path, char *list, size_t size)
{
struct nameidata nd;
int error;
ssize_t error;
error = user_path_walk(path, &nd);
if (error)
......@@ -252,11 +252,11 @@ sys_listxattr(char *path, char *list, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_llistxattr(char *path, char *list, size_t size)
{
struct nameidata nd;
int error;
ssize_t error;
error = user_path_walk_link(path, &nd);
if (error)
......@@ -266,11 +266,11 @@ sys_llistxattr(char *path, char *list, size_t size)
return error;
}
asmlinkage long
asmlinkage ssize_t
sys_flistxattr(int fd, char *list, size_t size)
{
struct file *f;
int error = -EBADF;
ssize_t error = -EBADF;
f = fget(fd);
if (!f)
......
......@@ -835,10 +835,10 @@ struct inode_operations {
int (*revalidate) (struct dentry *);
int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct dentry *, struct iattr *);
int (*setxattr) (struct dentry *, char *, void *, size_t, int);
int (*getxattr) (struct dentry *, char *, void *, size_t);
int (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, char *);
int (*setxattr) (struct dentry *, const char *, void *, size_t, int);
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
};
struct seq_file;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment