Commit 86999f87 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: 64-bit cleanups in the system calls

64-bit cleanup - this fixes the return values of the system calls to be longs.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 431a4c7b
......@@ -7,7 +7,7 @@
#define __SYSCALL_USER_H
extern int record_syscall_start(int syscall);
extern void record_syscall_end(int index, int result);
extern void record_syscall_end(int index, long result);
#endif
......
......@@ -34,9 +34,9 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
extern void log_exec(char **argv, void *tty);
static int execve1(char *file, char **argv, char **env)
static long execve1(char *file, char **argv, char **env)
{
int error;
long error;
#ifdef CONFIG_TTY_LOG
log_exec(argv, current->tty);
......@@ -51,19 +51,19 @@ static int execve1(char *file, char **argv, char **env)
return(error);
}
int um_execve(char *file, char **argv, char **env)
long um_execve(char *file, char **argv, char **env)
{
int err;
long err;
err = execve1(file, argv, env);
if(!err)
if(!err)
do_longjmp(current->thread.exec_buf, 1);
return(err);
}
int sys_execve(char *file, char **argv, char **env)
long sys_execve(char *file, char **argv, char **env)
{
int error;
long error;
char *filename;
lock_kernel();
......
......@@ -26,7 +26,7 @@ void ptrace_disable(struct task_struct *child)
child->thread.singlestep_syscall = 0;
}
int sys_ptrace(long request, long pid, long addr, long data)
long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int i, ret;
......
......@@ -167,7 +167,7 @@ int do_signal(int error)
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
{
sigset_t saveset;
......@@ -187,7 +187,7 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
}
}
int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
{
sigset_t saveset, newset;
......@@ -245,7 +245,7 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act,
return ret;
}
int sys_sigaltstack(const stack_t *uss, stack_t *uoss)
long sys_sigaltstack(const stack_t *uss, stack_t *uoss)
{
return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
}
......@@ -263,7 +263,7 @@ static int copy_sc_from_user(struct pt_regs *to, void *from,
return(ret);
}
int sys_sigreturn(struct pt_regs regs)
long sys_sigreturn(struct pt_regs regs)
{
void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
......@@ -281,7 +281,7 @@ int sys_sigreturn(struct pt_regs regs)
return(PT_REGS_SYSCALL_RET(&current->thread.regs));
}
int sys_rt_sigreturn(struct pt_regs regs)
long sys_rt_sigreturn(struct pt_regs regs)
{
unsigned long sp = PT_REGS_SP(&current->thread.regs);
struct ucontext __user *uc = sp_to_uc(sp);
......
......@@ -104,11 +104,11 @@ struct mmap_arg_struct {
unsigned long offset;
};
int old_mmap(unsigned long addr, unsigned long len,
long old_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long offset)
{
int err = -EINVAL;
long err = -EINVAL;
if (offset & ~PAGE_MASK)
goto out;
......@@ -120,10 +120,10 @@ int old_mmap(unsigned long addr, unsigned long len,
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though.
*/
int sys_pipe(unsigned long * fildes)
long sys_pipe(unsigned long * fildes)
{
int fd[2];
int error;
long error;
error = do_pipe(fd);
if (!error) {
......@@ -218,9 +218,9 @@ int sys_ipc (uint call, int first, int second,
}
}
int sys_uname(struct old_utsname * name)
long sys_uname(struct old_utsname * name)
{
int err;
long err;
if (!name)
return -EFAULT;
down_read(&uts_sem);
......@@ -229,9 +229,9 @@ int sys_uname(struct old_utsname * name)
return err?-EFAULT:0;
}
int sys_olduname(struct oldold_utsname * name)
long sys_olduname(struct oldold_utsname * name)
{
int error;
long error;
if (!name)
return -EFAULT;
......
......@@ -11,7 +11,7 @@
struct {
int syscall;
int pid;
int result;
long result;
struct timeval start;
struct timeval end;
} syscall_record[1024];
......@@ -30,7 +30,7 @@ int record_syscall_start(int syscall)
return(index);
}
void record_syscall_end(int index, int result)
void record_syscall_end(int index, long result)
{
syscall_record[index].result = result;
gettimeofday(&syscall_record[index].end, NULL);
......
......@@ -84,7 +84,7 @@ static inline pid_t setsid(void)
KERNEL_CALL(pid_t, sys_setsid)
}
static inline long lseek(unsigned int fd, off_t offset, unsigned int whence)
static inline off_t lseek(unsigned int fd, off_t offset, unsigned int whence)
{
KERNEL_CALL(long, sys_lseek, fd, offset, whence)
}
......@@ -102,13 +102,12 @@ static inline int write(unsigned int fd, char * buf, int len)
long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff);
int sys_execve(char *file, char **argv, char **env);
long sys_execve(char *file, char **argv, char **env);
long sys_clone(unsigned long clone_flags, unsigned long newsp,
int *parent_tid, int *child_tid);
long sys_fork(void);
long sys_vfork(void);
int sys_pipe(unsigned long *fildes);
int sys_ptrace(long request, long pid, long addr, long data);
long sys_pipe(unsigned long *fildes);
struct sigaction;
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
......
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