Commit cf59843b authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] Make arch-independent syscalls return long

From: "Randy.Dunlap" <randy.dunlap@verizon.net>

Fix up various syscalls to return longs, as x86_64 and ia64 (at least)
require.
parent 3ae81f12
...@@ -2071,8 +2071,8 @@ long sys32_module_warning(void) ...@@ -2071,8 +2071,8 @@ long sys32_module_warning(void)
return -ENOSYS ; return -ENOSYS ;
} }
int sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); long sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr);
int sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); long sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr);
/* only works on LE */ /* only works on LE */
long sys32_sched_setaffinity(pid_t pid, unsigned int len, long sys32_sched_setaffinity(pid_t pid, unsigned int len,
......
...@@ -142,7 +142,7 @@ int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt, ...@@ -142,7 +142,7 @@ int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt,
/* And here is where the userspace process can look up the cookie value /* And here is where the userspace process can look up the cookie value
* to retrieve the path. * to retrieve the path.
*/ */
asmlinkage int sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len)
{ {
unsigned long cookie = (unsigned long)cookie64; unsigned long cookie = (unsigned long)cookie64;
int err = -EINVAL; int err = -EINVAL;
......
...@@ -85,7 +85,7 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset ...@@ -85,7 +85,7 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
return 0; return 0;
} }
asmlinkage int old_readdir(unsigned int fd, void * dirent, unsigned int count) asmlinkage long old_readdir(unsigned int fd, void * dirent, unsigned int count)
{ {
int error; int error;
struct file * file; struct file * file;
......
...@@ -421,7 +421,7 @@ extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsign ...@@ -421,7 +421,7 @@ extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsign
extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access);
extern int make_pages_present(unsigned long addr, unsigned long end); extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
extern int sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock); extern long sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock);
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
......
...@@ -736,7 +736,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p) ...@@ -736,7 +736,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
p->flags = new_flags; p->flags = new_flags;
} }
asmlinkage int sys_set_tid_address(int *tidptr) asmlinkage long sys_set_tid_address(int *tidptr)
{ {
current->clear_child_tid = tidptr; current->clear_child_tid = tidptr;
......
...@@ -1902,7 +1902,7 @@ asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param *param) ...@@ -1902,7 +1902,7 @@ asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param *param)
* @len: length in bytes of the bitmask pointed to by user_mask_ptr * @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to the new cpu mask * @user_mask_ptr: user-space pointer to the new cpu mask
*/ */
asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len, asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr) unsigned long *user_mask_ptr)
{ {
unsigned long new_mask; unsigned long new_mask;
...@@ -1954,7 +1954,7 @@ asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len, ...@@ -1954,7 +1954,7 @@ asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
* @len: length in bytes of the bitmask pointed to by user_mask_ptr * @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to hold the current cpu mask * @user_mask_ptr: user-space pointer to hold the current cpu mask
*/ */
asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len, asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr) unsigned long *user_mask_ptr)
{ {
unsigned int real_len; unsigned int real_len;
......
...@@ -2254,7 +2254,7 @@ sys_signal(int sig, __sighandler_t handler) ...@@ -2254,7 +2254,7 @@ sys_signal(int sig, __sighandler_t handler)
#ifndef HAVE_ARCH_SYS_PAUSE #ifndef HAVE_ARCH_SYS_PAUSE
asmlinkage int asmlinkage long
sys_pause(void) sys_pause(void)
{ {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
......
...@@ -113,7 +113,7 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, ...@@ -113,7 +113,7 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma,
* protection is used. Arbitrary protections might be implemented in the * protection is used. Arbitrary protections might be implemented in the
* future. * future.
*/ */
int sys_remap_file_pages(unsigned long start, unsigned long size, long sys_remap_file_pages(unsigned long start, unsigned long size,
unsigned long __prot, unsigned long pgoff, unsigned long flags) unsigned long __prot, unsigned long pgoff, unsigned long flags)
{ {
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
......
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